Encoding apparatus and encoding method

ABSTRACT

The present invention makes it possible to encode information into a code with a smaller number of bits. An encoding apparatus encodes an acoustic time series signal such that the acoustic time series signal is split into band signals in predetermined bands and gain adjustment is made on the band signals, at a gain control position by a gain control amount, for each of as many positions as indicated by a gain control number. Although the gain control number can take any one of values from 0 to 7, it has a high probability of taking a particular value (0, for example) as shown in FIG.  10 . In the present invention, in view of the above, the gain control number GA is encoded such that a code with a small number of bits is assigned to the gain control number GA equal to a value having a high-occurrence probability. The present invention may be applied to a voice recording apparatus.

TECHNICAL FIELD

[0001] The present invention relates to an encoding apparatus and anencoding method, and more particularly, to an encoding apparatus and anencoding method capable of performing encoding with an improved encodingefficiency.

BACKGROUND ART

[0002]FIG. 1 shows an example of a construction of an encoding apparatus1 according to a conventional technique.

[0003] A band splitter 11, formed of a filter such as a QMF (QuadratureMirror Filter) or a PQF (Polyphase Quadrature Filter), splits inputaudio signal into plural (12, in this specific example) frequency bandsand outputs resultant signals of respective bands (hereinafter, suchsignals will be referred to as encoding units) A0 to A11 (when it is notnecessary to distinguish individual encoding units from each other, asimple expression “encoding unit A” will be employed. Similar simpleexpressions will also be used elsewhere in the present description) torespective spectrum converters 12-1 to 12-12 corresponding to the bands.

[0004] The band splitter 11 may split the signal into bands with anequal bandwidth or into critical bands whose bandwidth increases withfrequency taking into account the characteristics of human ears.

[0005] The spectrum converters 12-1 to 12-12 divide the encoding unitsA0 to A11 received from the band splitter 11 into blocks (frames) with afixed length (a fixed period of time), generate gain control informationG0 to G11 (which will be described in detail later) depending on theamplitudes of the waveform signals of the respective blocks, and controlthe gains of the waveform signals of the respective blocks in accordancewith the gain control information G0 to G11. The generated gain controlinformation G0 to G11 are supplied from the spectrum converters 12-1 to12-12 to a multiplexer 16.

[0006] After performing the gain control, the spectrum converters 12-1to 12-12 perform spectrum conversions based on DFT (discrete Fouriertransformation) or DCT (discrete cosine transformation) on the signalsthereby generating spectral component signals S0 to S11. The resultantspectral component signals S0 to S11 are supplied to a quantization stepsize setting unit 14 and also to normalizers 13-1 to 13-12 of therespective bands.

[0007] The normalizers 13-1 to 13-12 normalize the spectral componentsignals S0 to S11 received from the spectrum converters 12-1 to 12-12.

[0008] More specifically, the normalizers 13-1 to 13-12 detect a signalcomponent having a greatest absolute value from the spectral componentsignals S0 to S11 every unit of time and normalize the spectralcomponent signals S0 to S11 by employing relative values of coefficientswith respect to the detected greatest value as the normalized spectralcomponent signals B0 to B11.

[0009] The normalizers 13-1 to 13-12 supply the calculated normalizedcoefficients B0 to B11 to the multiplexer 16 and supply normalized dataC0 to C11 obtained by normalizing the spectral component signals S0 toS11 to respective quantizers 15-1 to 15-12 corresponding to therespective bands.

[0010] On the basis of the spectral component signals S0 to S11 receivedfrom the spectrum converters 12-1 to 12-12, the quantization step sizesetting unit 14 determines quantization step sizes to be used inquantization of the normalized data C0 to C11, and outputs quantizationstep size information D0 to D11 indicating the determined quantizationstep sizes to the corresponding quantizers 15-1 to 15-12. Thequantization step size setting unit 14 also supplies the quantizationstep size information D0 to D11 to the multiplexer 16.

[0011] The quantizers 15-1 to 15-12 quantize the normalized data C0 toC11 supplied every unit of time from the normalizers 13-1 to 13-12, byemploying quantization step sized specified by the quantization stepsize information D0 to D11 received from the quantization step sizesetting unit 14. Resultant quantized coefficients F0 to F11 (quantizedcoefficients F of one frame) obtained via the quantization are suppliedto the multiplexer 16.

[0012] The multiplexer 16 encodes the gain control information G0 to G11received from the spectrum converter 12, the normalized coefficients B0to B11 received from the normalizer 13, the quantization step sizeinformation D0 to D11 received from the quantization step size settingunit 14, and the quantized coefficients F0 to F11 received from thequantizer 15, on a frame-by-frame basis.

[0013] For example, as shown in FIG. 2, encoded data of an (L−1)th frameand encoded data of an Lth frame each include encoded gain controlinformation G0 to G11, normalized coefficients B0 to B11, quantizationstep size information D0 to D11, and quantized coefficients F0 to F11.

[0014]FIG. 3 shows an example of a construction of the spectrumconverter 12.

[0015] A windowing unit 21 divides an encoding unit A received from theband splitter 11 into blocks having a fixed length (a fixed period oftime) and each blocks is multiplied by a window conversion function.More precisely, the windowing unit 21 applies the window conversionfunction for a range including one block and portions of temporallyadjacent blocks. As a result, a waveform signal such as that shown inFIG. 4A or 4B is generated. The windowing unit 21 supplies the resultantwaveform signal to a detector 22.

[0016] The detector 22 determines whether the waveform signal receivedfrom the windowing unit 21 includes an attack portion AT or a releaseportion RE, on a block-by-block basis. If it is determined that thewaveform signal includes an attack portion AT or a release portion RE,the detector 22 generates a detection flag indicating that the waveformsignal includes an attack portion AT or a release portion RE.

[0017] The attack portion AT refers to a portion in which the level ofthe waveform signal increases abruptly, and the release portion RErefers to a portion in which the level decreases abruptly, as shown inFIG. 4A or 4B.

[0018] If an attack portion AT or a release portion RE is detected in awaveform signal of a block, the detector 22 generates a detection flagindicating that the waveform signal includes an attack portion AT or arelease portion RE. In this case, the detector 22 also generates gaincontrol amount information indicating a gain control amount depending onthe level of a low-level signal preceding the attack portion AT(hereinafter, such a low-level signal will be referred to as a semistationary portion SS) or depending on the level of the release portionRE, gain control position information indicating a position at whichgain control is to be performed by the gain control amount, and thenumber of portions to be subjected to the gain control (hereinafter,such a number of portions will be referred to as a gain control number).

[0019] For example, when a waveform signal such as that shown in FIG. 4Aor 4B is input, the detector 22 generates a detection flag indicatingthat the signal includes an attack portion AT or a release portion REand also generates first gain control amount information indicating thegain control amount corresponding to the level of the semi stationaryportion SS, second gain control amount information indicating the gaincontrol amount corresponding to the level of the release portion, firstgain control position information indicating a position at which gaincontrol is to be performed by the gain control amount indicated by thefirst gain control amount information, second gain control positioninformation indicating a position at which gain control is to beperformed by the gain control amount indicated by the second gaincontrol amount information, and a gain control number indicating thatgain control is to be performed at two positions.

[0020] For example, in a case in which the gain control amount of therelease portion RE is set to 1, the gain control amount informationassociated with the semi stationary portion SS shown in FIG. 4Aindicates a relatively small gain control amount (SSa), as shown in FIG.4C, because the noise levels of the semi stationary portion SS and therelease portion RE are relatively high.

[0021] On the other hand the gain control amount information associatedwith the waveform signal shown in FIG. 4B indicates a relatively largegain control amount (SSb), as shown in FIG. 4C, because the noise levelsof the semi stationary portion SS and the release portion RE arerelatively low.

[0022] In the case in which the waveform signal of a block includes anattack portion AT or a release portion RE, a detection flag indicatingthat the waveform signal includes an attack portion AT or a releaseportion RE, gain control amount information, gain control positioninformation, and a gain control number are generated by the detector 22and supplied to a controller 23 together with the waveform signal outputfrom the windowing unit 21. In a case in which a waveform signal of ablock includes neither an attack portion AT nor a release portion RE,the detector 22 outputs to the controller 23 a detection flag indicatingthat the waveform signal includes neither attack portion AT nor arelease portion RE, together with the waveform signal received from thewindowing unit 21.

[0023] In the case in which the detection flag indicates that thewaveform signal includes an attack portion AT or a release portion RE,the controller 23 controls the gain of the waveform signal of the blockin accordance with the gain control number, the gain control amountinformation, and the gain control position information, which weresupplied together with the detection flag. The signal obtained via thegain control process is supplied to a spectrum converter 24 from thecontroller 23.

[0024] For example, in the case of the waveform signal shown in FIG. 4A,the waveform signal is multiplied by a gain control function A shown inFIG. 4C. In the case of the waveform signal shown in FIG. 4B, thewaveform signal is multiplied by a gain control function B shown in FIG.4C.

[0025] In the case in which the detection flag indicates that thewaveform signal includes neither an attack portion AT or a releaseportion RE, the controller 23 does not substantially perform the gaincontrol on the waveform signal of the block received from the detector22 but directly supplies the waveform signal to the spectrum converter24.

[0026] When the controller 23 receives, in addition to a detection flag,a gain control number, gain control amount information, and gain controlposition information from the detector 22, the controller 23 suppliesthe received data as gain control information G to the multiplexer 16.However, in the case in which a gain control number, gain control amountinformation, and gain control position information were not supplied,the controller 23 outputs, to the multiplexer 16, gain controlinformation G including only the detection flag indicating that thewaveform signal includes neither an attack portion AT nor a releaseportion RE.

[0027] In the case in which the gain control information G received fromthe controller 23 of the spectrum converter 12 includes only a detectionflag, the multiplexer 16 encodes and multiplexes only the detection flagas the gain control information G, as is the case with the encoded dataof the (L−1)th frame shown in FIG. 2.

[0028] However, in the case in which the gain control information Greceived from the controller 23 includes not only a detection flag butalso a gain control number, gain control amount information, and gaincontrol position information, the multiplexer 16 encodes and multiplexesthe detection flag, the gain control number, the gain control amountinformation, and the gain control position information, as the gaincontrol information G, as is the case with the encoded data of the Lthframe shown in FIG. 2.

[0029] Referring again to FIG. 3, the spectrum converter 24 performs aspectrum conversion based on DFT, DCT, or MDCT on the signal receivedfrom the controller 23. A resultant spectral component signal S obtainedvia the spectrum conversion is supplied to the normalizer 13.

[0030]FIG. 5 shows an example of a construction of a decoding apparatus2 for decoding the encoded data generated by the encoding apparatus 1shown in FIG. 1.

[0031] A demultiplexer 31 decodes the encoded data supplied from theencoding apparatus 1 shown in FIG. 1 and separates the decoded data intogain control information G0 to G11, normalized coefficients B0 to B11,quantization step size information D0 to D11, and quantized coefficientsF0 to F11.

[0032] The separated normalized coefficients B0 to B11, quantizationstep size information D0 to D11, and quantized coefficients F0 to F11are supplied from the demultiplexer 31 to correspondingdequantizers/denormalizers 32-1 to 32-12, while the gain controlinformation G0 to G11 are supplied to corresponding inverse spectrumconverters 33-1 to 33-12.

[0033] The dequantizer/denormalizer 32 dequantizes the quantizedcoefficients F by employing a quantization step size corresponding tothat indicated by the quantization step size information D andmultiplies the normalized data C obtained via the dequantization by avalue corresponding to the normalized coefficient B (therebydenormalizing the normalized data C). The signal obtained as a result ofthe above process is supplied to the inverse spectrum converter 33.

[0034] The inverse spectrum converter 33 performs an inverse spectrumconversion which is an inverse transformation of the spectrum conversionperformed by the encoding apparatus 1.

[0035] In accordance with the gain control information G, the inversespectrum converter 33 performs a gain control adjustment on the signalobtained via the inverse spectrum conversion and the inverse spectrumconverter 33 outputs resultant encoding units A to a band combiner 34.

[0036] The band combiner 34 combines the encoding units A received fromthe inverse spectrum converter 33 such that overlapped sample data ofthe block are interfered with each other, thereby reconstructing anaudio signal.

[0037]FIG. 6 shows an example of a construction of the inverse spectrumconverter 33.

[0038] An inverse spectrum converter 41 performs an inverse spectrumconversion, which is an inverse transformation of the spectrumconversion performed by the encoding apparatus 1, on the data outputfrom the dequantizer/denormalizer 32.

[0039] More specifically, in a case in which the spectrum conversion isperformed by the encoding apparatus 1 on the basis of DFT, the inversespectrum conversion is performed on the basis of IDFT. In a case inwhich the spectrum conversion is performed by the encoding apparatus 1on the basis of DCT, the inverse spectrum conversion is performed on thebasis of IDCT.

[0040] The adjusting unit 42 performs a gain control adjustment on thesignal received from the inverse spectrum converter 41, in accordancewith the gain control information G supplied from the demultiplexer 31.

[0041] More specifically, when the detection flag included in the gaincontrol information G indicates the presence of an attack portion AT ora release portion RE, the adjusting unit 42 performs the gain controladjustment on the signal received from the inverse spectrum converter41, in accordance with the gain control number, the gain controlposition information, and the gain control amount information That is,the signal output from the inverse spectrum converter 41 is multipliedby the a gain control adjustment function corresponding to the gaincontrol function employed in the encoding process.

[0042] For example, in the case of a waveform signal shown in FIG. 4A,when the encoding apparatus 1 controlled the gain thereof, a gaincontrol function A having relatively small gain control amounts as shownin FIG. 4C was employed. Therefore, in the gain control adjustment forthe signal obtained by dequantizing and denormalizing the encoded dataof the waveform signal shown in FIG. 4A, the signal is multiplied by again control adjustment function having relatively small gain controlamounts.

[0043] Thus, in this case, as can be seen from FIG. 4D, although noisesuppression for the semi stationary portion SS and the release portionRE is relatively low, quantization noise energy is suppressed to a lowlevel over the entire block.

[0044] On the other hand, in the case of a waveform signal shown in FIG.4B, when the encoding apparatus 1 controlled the gain thereof, a gaincontrol function B having relatively large gain control amounts as shownin FIG. 4C was employed. Therefore, in the gain control adjustment forthe signal obtained by dequantizing and denormalizing the encoded dataof the waveform signal shown in FIG. 4B, the signal is multiplied by again control adjustment function having relatively large gain controlamounts.

[0045] Thus, in this case, as can be seen from FIG. 4E, although theattack portion AT in the block includes relatively large quantizationnoise energy, quantization noise is suppressed to low levels for boththe semi stationary portion SS and the release portion RE.

[0046] Therefore, a pre-echo or post-echo problem in hearing thewaveform signal such as that shown in FIG. 4A or 4B is suppressed.

[0047] On the other hand, in the case in which the detection flagindicates that there is neither an attack portion AT nor a releaseportion RE, the adjusting unit 42 does not substantially perform thesignal attenuating process on the signal received from the inversespectrum converter 41.

[0048] The manner of encoding and decoding an audio signal has beendescribed above.

[0049] In the case in which a waveform signal in a frame includes anattack portion AT or a release portion RE, the encoding apparatus 1 alsoencodes gain control information G including gain control number, gaincontrol position information and gain control amount information inaddition to a detection flag. In the conventional technique, forexample, the gain control number, the gain control position information,and the gain control amount information are encoded into 3-bit, 4-bit,and 5-bit codes, respectively.

[0050] Because the total data size of encoded data of a frame isgenerally fixed, encoding of the gain control number, the gain controlposition information, and the gain control amount information into suchfixed-length codes results in a limitation on the number of bitsavailable for encoding of quantized coefficients F and thus results in areduction in the encoding efficiency of the quantized coefficients F.

DISCLOSURE OF THE INVENTION

[0051] In view of the above, it is an object of the present invention toprovide a technique of improving the encoding efficiency.

[0052] The present invention provides a first encoding apparatuscomprising detection means for detecting a gain control number of afirst arbitrary band signal of band signals and a gain control number ofa second band signal in a band adjacent to the band of the first bandsignal; calculation means for calculating the difference value betweenfirst gain control number detected by the detection means from the firstband signal and second gain control number detected by the detectionmeans from the second band signal; retaining means for retaining a tableindicating a value-code correspondence in which a code with a smallnumber of bits is assigned to a value having a high probability of beingobtained as the result of the calculation of the difference valueperformed by the calculation means; gain control number encoding meansfor encoding the first gain control number such that a codecorresponding to the difference value calculated by the calculationmeans is retrieved from the table and the retrieved code is employed asthe code of the first gain control number; gain control amountinformation encoding means for encoding gain control amount informationindicating a particular value corresponding to a gain control amount;and gain control position information encoding means for encoding gaincontrol position information indicating a particular value correspondingto a gain control position.

[0053] The table indicating the difference value versus codecorrespondence may include only one or more difference values havinghigh probabilities of being obtained as the result of the calculationperformed by the calculation means. In this case, when a calculateddifference value is not found in the table, the gain control numberencoding means may encode an escape code and the first gain controlnumber.

[0054] The present invention provides a first encoding method comprisinga detection step of detecting a gain control number of a first arbitraryband signal of band signals and a gain control number of a second bandsignal in a band adjacent to the band of the first band signal; acalculation step of calculating the value between a first gain controlnumber detected in the detection step from the first band signal and asecond gain control number detected in the detection step from thesecond band signal; a retaining step of retaining a table indicating avalue-code correspondence in which a code with a small number of bits isassigned to a value having a high probability of being obtained as theresult of the calculation of the difference value performed in thecalculation step; a gain control number encoding step of encoding thefirst gain control number such that a code corresponding to thedifference value calculated in the calculation step is retrieved fromthe table and the retrieved code is employed as the code of the firstgain control number; a gain control amount information encoding step ofencoding gain control amount information indicating a particular valuecorresponding to a gain control amount; and a gain control positioninformation encoding step of encoding gain control position informationindicating a particular value corresponding to a gain control position.

[0055] In the first encoding apparatus and encoding method according tothe present invention, a gain control number of a first arbitrary bandsignal of band signals and a gain control number of a second band signalin a band adjacent to the band of the first band signal are detected;the difference value between first gain control number detected from thefirst band signal and second gain control number detected from thesecond band signal is calculated; there is retained a table in whichcodes with small numbers of bits are assigned to values having highprobabilities of being obtained as the result of calculation of thedifference value; a code corresponding to the calculated differencevalue is retrieved from the table and the retrieved code is employed asthe code of the first gain control number; gain control amountinformation indicating a particular value corresponding to a gaincontrol amount is encoded; and gain control position informationindicating a particular value corresponding to a gain control positionis encoded.

[0056] The present invention provides a second encoding apparatuscomprising detection means for detecting a gain control number of afirst arbitrary band signal of band signals and a gain control number ofa second band signal in a band adjacent to the band of the first bandsignal; determination means for determining whether a first gain controlnumber detected by the detection means from the first band signal and asecond gain control number detected by the detection means from thesecond band signal are equal to each other; gain control number encodingmeans for performing encoding such that if the determination made by thedetermination means is affirmative, only a flag indicating that thefirst and second gain control numbers are equal to each other isencoded, while, if the determination made by the determination means isnegative, both a flag indicating that the first and second gain controlnumbers are not equal to each other and the second gain control numberare encoded; gain control amount information encoding means for encodinggain control amount information indicating a particular valuecorresponding to a gain control amount; and gain control positioninformation encoding means for encoding gain control positioninformation indicating a particular value corresponding to a gaincontrol position.

[0057] The present invention provides a second encoding methodcomprising a detection step of detecting a gain control number of afirst arbitrary band signal of band signals and a gain control number ofa second band signal in a band adjacent to the band of the first bandsignal; a determination step of determining whether a first gain controlnumber detected in the detection step from the first band signal and asecond gain control number detected from the second band signal areequal to each other; a gain control number encoding step of performingencoding such that if the determination made in the determination stepis affirmative, only a flag indicating that the first and second gaincontrol numbers are equal to each other is encoded, while, if thedetermination made in the determination step is negative, both a flagindicating that the first and second gain control numbers are not equalto each other and the second gain control number are encoded; a gaincontrol amount information encoding step of encoding gain control amountinformation indicating a particular value corresponding to a gaincontrol amount; and a gain control position information encoding step ofencoding gain control position information indicating a particular valuecorresponding to a gain control position.

[0058] In the second encoding apparatus and encoding method according tothe present invention, a gain control number of a first arbitrary bandsignal of band signals and a gain control number of a second band signalin a band adjacent to the band of the first band signal are detected; itis determined whether a first gain control number detected from thefirst band signal and a second gain control number detected from thesecond band signal are equal to each other; if the result of thedetermination is affirmative, only a flag indicating that the first gaincontrol number and the second gain control number are equal to eachother is encoded, while if the result of the determination is negative,a flag indicating that the first gain control number and the second gaincontrol number are not equal to each other and the second gain controlnumber are encoded; gain control amount information indicating aparticular value corresponding to a gain control amount is encoded; andgain control position information indicating a particular valuecorresponding to a gain control position is encoded.

[0059] The present invention provides a third encoding apparatuscomprising detection means for detecting a gain control number of a bandsignal; calculation means for calculating a smallest number of bitswhich can represent the difference between the maximum and minimumvalues of the gain control numbers detected by the detection means; gaincontrol number encoding means for encoding the gain control number suchthat the minimum value determined by the calculation means is encoded, avalue obtained by subtracting the minimum value from the gain controlnumber detected by the detection means is expressed by as many bits asthe smallest number of bits calculate by the calculation means, and aresultant expression is employed as the code of the gain control number;gain control amount information encoding means for encoding gain controlamount information indicating a particular value corresponding to a gaincontrol amount; and gain control position information encoding means forencoding gain control position information indicating a particular valuecorresponding to a gain control position.

[0060] The present invention provides a third encoding method comprisinga detection step of detecting gain control numbers of the band signals;a calculation step of calculating a smallest number of bits which canrepresent the difference between the maximum and minimum values of thegain control numbers detected in the detection step; a gain controlnumber encoding step for encoding the gain control number such that theminimum value determined in the calculation step is encoded, a valueobtained by subtracting the minimum value from the gain control numberdetected in the detection step is expressed by as many bits as thesmallest number of bits calculated in the calculation step, and aresultant expression is employed as the code of the gain control number;a gain control amount information encoding step of encoding gain controlamount information indicating a particular value corresponding to a gaincontrol amount; and a gain control position information encoding step ofencoding gain control position information indicating a particular valuecorresponding to a gain control position.

[0061] In the third encoding apparatus and encoding method according tothe present invention, a gain control number of a band signal isdetected; the smallest number of bits which can represent the differencebetween the maximum and minimum values of the detected gain controlnumbers is calculated; the determined minimum value is encoded andfurthermore gain control numbers are encoded such that values obtainedby subtracting the minimum value from the detected gain control numbersare expressed by as many bits as the smallest number of bits calculateabove, and resultant expressions are employed as the codes of the gaincontrol numbers; gain control amount information indicating a particularvalue corresponding to a gain control amount is encoded; and gaincontrol position information indicating a particular value correspondingto a gain control position is encoded.

[0062] The present invention provides a fourth encoding apparatuscomprising detection means for detecting a gain control number of anarbitrary band signal of the left-channel signal and a gain controlnumber of a band signal of the right-channel signal in the same band asthat of the band signal of the left-channel signal; calculation meansfor calculating the difference value between a first gain control numberdetected by the detection means from a band signal of the left-channelsignal and a second gain control number detected by the detection meansfrom a band signal of the right-channel signal; retaining means forretaining a table indicating a value-code correspondence in which a codewith a small number of bits is assigned to a value having a highprobability of being obtained as the result of the calculation of thedifference value performed by the calculation means; gain control numberencoding means for encoding the first or second gain control number suchthat a code corresponding to the difference value calculated by thecalculation means is retrieved from the table and the retrieved code isemployed as the code of the first or second gain control number; gaincontrol amount information encoding means for encoding gain controlamount information indicating a particular value corresponding to a gaincontrol amount; and gain control position information encoding means forencoding gain control position information indicating a particular valuecorresponding to a gain control position.

[0063] The table indicating the difference value versus codecorrespondence may include only one or more difference values havinghigh probabilities of being obtained as the result of the calculationperformed by the calculation means. In this case, when thecorrespondence of the calculated difference value is not found in thetable, the gain control number encoding means may encode an escape codeand the gain control number.

[0064] The present invention provides a fourth encoding methodcomprising a detection step of detecting a gain control number of anarbitrary band signal of a left-channel signal and a gain control numberof a band signal of a right-channel signal in the same band as that ofthe band signal of the left-channel signal; a calculation step ofcalculating the difference value between first gain control numberdetected in the detection step from the band signal of the left-channelsignal and second gain control number detected in the detection stepfrom the band signal of the right-channel signal; a retaining step ofretaining a table indicating a value-code correspondence in which a codewith a small number of bits is assigned to a value having a highprobability of being obtained as the result of the calculation of thedifference value performed in the calculation step; a gain controlnumber encoding step of encoding the first or second gain control numbersuch that a code corresponding to the difference value calculated in thecalculation step is retrieved from the table and the retrieved code isemployed as the code of the first or second gain control number; a gaincontrol amount information encoding step of encoding gain control amountinformation indicating a particular value corresponding to a gaincontrol amount; and a gain control position information encoding step ofencoding gain control position information indicating a particular valuecorresponding to a gain control position.

[0065] In the fourth encoding apparatus and encoding method according tothe present invention, a gain control number of an arbitrary band signalof a left-channel signal and a gain control number of a band signal of aright-channel signal in the same band as that of the band signal of theleft-channel signal are detected; the difference value between a firstgain control number detected from a band signal of the left-channelsignal and a second gain control number detected from a band signal ofthe right-channel signal are calculated; there is retained a table inwhich codes with small numbers of bits are assigned to values havinghigh probabilities of being obtained as the result of calculation of thedifference value; a code corresponding to the calculated differencevalue is retrieved from the table and the retrieved code is employed asthe code of the first or second gain control number; gain control amountinformation indicating a particular value corresponding to a gaincontrol amount is encoded; and gain control position informationindicating a particular value corresponding to a gain control positionis encoded.

[0066] The present invention provides a fifth encoding apparatuscomprising detection means for detecting a gain control number of anarbitrary band signal of the left-channel signal and a gain controlnumber of a band signal of the right-channel signal in the same band asthat of the band signal of the left-channel signal; determination meansfor determining whether a first gain control number detected by thedetection means from a band signal of the left-channel signal and asecond gain control number detected by the detection means from a bandsignal of the right-channel signal are equal to each other; gain controlnumber encoding means for performing encoding such that if thedetermination made by the determination means is affirmative, a flagindicating that the first and second gain control numbers are equal toeach other and the first or second gain control number are encoded,while, if the determination made by the determination means is negative,a flag indicating that the first and second gain control numbers are notequal to each other and the second and gain control numbers are encoded;gain control amount information encoding means for encoding gain controlamount information indicating a particular value corresponding to a gaincontrol amount; and gain control position information encoding means forencoding gain control position information indicating a particular valuecorresponding to a gain control position.

[0067] The present invention provides a fifth encoding method comprisinga detection step of detecting a gain control number of an arbitrary bandsignal of a left-channel signal and a gain control number of a bandsignal of a right-channel signal in the same band as that of the bandsignal of the left-channel signal; a determination step of determiningwhether a first gain control number detected in the detection step fromthe band signal of the left-channel signal and a second gain controlnumber detected in the detection step from the band signal of theright-channel signal are equal to each other; a gain control numberencoding step of performing encoding such that if the determination madein the determination step is affirmative, a flag indicating that thefirst and second gain control numbers are equal to each other and thefirst or second gain control number are encoded, while, if thedetermination made in the determination step is negative, a flagindicating that the first and second gain control numbers are not equalto each other and the second and gain control numbers are encoded; again control amount information encoding step of encoding gain controlamount information indicating a particular value corresponding to a gaincontrol amount; and a gain control position information encoding step ofencoding gain control position information indicating a particular valuecorresponding to a gain control position.

[0068] In the fifth encoding apparatus and encoding method according tothe present invention, a gain control number of an arbitrary band signalof a left-channel signal and a gain control number of a band signal of aright-channel signal in the same band as that of the band signal of theleft-channel signal are detected; it is determined whether a first gaincontrol number detected from the band signal of the left-channel signaland a second gain control number detected from the band signal of theright-channel signal are equal to each other; if the result of thedetermination is affirmative, a flag indicating that the first gaincontrol number and the second gain control number are equal to eachother and the first or second gain control number are encoded, while ifthe result of the determination is negative, a flag indicating that thefirst gain control number and the second gain control number are notequal to each other and the first and second gain control number areencoded; gain control amount information indicating a particular valuecorresponding to a gain control amount is encoded; and gain controlposition information indicating a particular value corresponding to again control position is encoded.

[0069] The present invention provides a sixth encoding apparatuscomprising detection means for detecting gain control numbers of bandsignals of the left-channel signal and gain control numbers of bandsignals of the right-channel signal; determination means for determiningwhether first gain control numbers detected by the detection means fromthe band signals of the left-channel signal and second gain controlnumbers detected by the detection means from the corresponding bandsignals of the right-channel signal are equal to each other for allbands; gain control number encoding means for performing encoding suchthat if the determination made by the determination means isaffirmative, the first or second gain control numbers are encoded,while, if the determination made by the determination means is negative,the first and second gain control numbers are encoded; gain controlamount information encoding means for encoding gain control amountinformation indicating a particular value corresponding to a gaincontrol amount; and gain control position information encoding means forencoding gain control position information indicating a particular valuecorresponding to a gain control position.

[0070] The present invention provides a sixth encoding method comprisinga detection step of detecting a gain control number of a band signal ofa left-channel signal and a gain control number of a band signal of aright-channel signal; a determination step of determining whether firstgain control numbers detected in the detection step from the bandsignals of the left-channel signal and second gain control numbersdetected in the detection step from the corresponding band signals ofthe right-channel signal are equal to each other for all bands; a gaincontrol number encoding step of performing encoding such that if thedetermination made in the determination step is affirmative, the firstor second gain control numbers are encoded, while, if the determinationmade in the determination step is negative, the first and second gaincontrol numbers are encoded; a gain control amount information encodingstep of encoding gain control amount information indicating a particularvalue corresponding to a gain control amount; and a gain controlposition information encoding step of encoding gain control positioninformation indicating a particular value corresponding to a gaincontrol position.

[0071] In the sixth encoding apparatus and encoding method according tothe present invention, a gain control number of a band signal of aleft-channel signal and a gain control number of a band signal of aright-channel signal are detected; it is determined whether first gaincontrol numbers detected from the band signals of the left-channelsignal and second gain control numbers detected from the correspondingband signals of the right-channel signal are equal to each other for allbands; if the result of the determination is affirmative, the first orsecond gain control numbers are encoded, while if the result of thedetermination is negative, the first and second gain control numbers areencoded; gain control amount information indicating a particular valuecorresponding to a gain control amount is encoded; and gain controlposition information indicating a particular value corresponding to again control position is encoded.

[0072] The present invention provides a seventh encoding apparatuscomprising detection means for detecting gain control numbers of anarbitrary first band signal, a second band signal, a third band signal,and a fourth band signal, respectively, the first band signal and thesecond band signal being of band signals of a left-channel signal, thesecond band signal being of a band adjacent to a band of the first bandsignal, the third band signal and the fourth band signal being of bandsignals of a right-channel signal, the third band signal correspondingto the first band signal, the fourth band signal corresponding to thesecond band signal; first calculation means for calculating thedifference value between first gain control number detected by thedetection means from the first band signal and second gain controlnumber detected by the detection means from the second band signal;second calculation means for calculating the difference value betweenthird gain control number detected from the third band signal and fourthgain control number detected from the fourth band signal; thirdcalculation means for calculating the difference value between thedifference value calculated by the first calculation means and thedifference value calculated by the second calculation means; retainingmeans for retaining a table indicating a value-code correspondence inwhich a code with a small number of bits is assigned to a value having ahigh probability of being obtained as the result of the calculation ofthe difference value performed by the third calculation means; gaincontrol number encoding means for encoding the first gain control numbersuch that a code corresponding to the difference value calculated by thethird calculation means is retrieved from the table and the retrievedcode is employed as the code of the first gain control number; gaincontrol amount information encoding means for encoding gain controlamount information indicating a particular value corresponding to a gaincontrol amount; and gain control position information encoding means forencoding gain control position information indicating a particular valuecorresponding to a gain control position.

[0073] The table indicating the difference value versus codecorrespondence may include only one or more difference values havinghigh probabilities of being obtained as the result of the calculationperformed by the third calculation means. In this case, when thecorrespondence of the calculated difference value is not found in thetable, the gain control number encoding means may encode an escape codeand the first gain control number.

[0074] The present invention provides a seventh encoding methodcomprising a detection step for detecting gain control numbers of anarbitrary first band signal, a second band signal, a third band signal,and a fourth band signal, respectively, the first band signal and thesecond band signal being of band signals of a left-channel signal, thesecond band signal being of a band adjacent to a band of the first bandsignal, the third band signal and the fourth band signal being of bandsignals of a right-channel signal, the third band signal correspondingto the first band signal, the fourth band signal corresponding to thesecond band signal; a first calculation step of calculating thedifference value between a first gain control number detected in thedetection step from the first band signal and a second gain controlnumber detected in the detection step from the second band signal; asecond calculation step of calculating the difference value between athird gain control number detected from the third band signal and afourth gain control number detected from the fourth band signal; a thirdcalculation step of calculating the difference value between thedifference value calculated in the first calculation step and thedifference value calculated in the second calculation step; a retainingstep of retaining a table indicating a value-code correspondence inwhich a code with a small number of bits is assigned to a value having ahigh probability of being obtained as the result of the calculation ofthe difference value performed in the third calculation step; a gaincontrol number encoding step of encoding the first gain control numbersuch that a code corresponding to the difference value calculated in thethird calculation step is retrieved from the table and the retrievedcode is employed as the code of the first gain control number; a gaincontrol amount information encoding step of encoding gain control amountinformation indicating a particular value corresponding to a gaincontrol amount; and a gain control position information encoding step ofencoding gain control position information indicating a particular valuecorresponding to a gain control position.

[0075] In the seventh encoding apparatus and encoding method accordingto the present invention, gain control numbers of an arbitrary firstband signal, a second band signal, a third band signal, and a fourthband signal are detected, wherein the first band signal and the secondband signal are of band signals of a left-channel signal, the secondband signal is of a band adjacent to a band of the first band signal,the third band signal and the fourth band signal are of band signals ofa right-channel signal, the third band signal corresponds to the firstband signal, and the fourth band signal corresponds to the second bandsignal; the difference value between a first gain control numberdetected from the first band signal and a second gain control numberdetected from the second band signal is calculated; the difference valuebetween a third gain control number detected from the third band signaland a fourth gain control number detected from the fourth band signal iscalculated; the difference value between the calculated differencevalues is further calculated; there is retained a table in which codeswith small numbers of bits are assigned to values having highprobabilities of being obtained as the result of calculation of thedifference value; a code corresponding to the calculated differencevalue is retrieved from the table and the retrieved code is employed asthe code of the first gain control number; gain control amountinformation indicating a particular value corresponding to a gaincontrol amount is encoded; and gain control position informationindicating a particular value corresponding to a gain control positionis encoded.

[0076] The present invention provides an eighth encoding apparatuscomprising detection means for detecting gain control amount informationindicating a particular value corresponding to a gain control amount ofa band signal; calculation means for calculating the difference valuebetween arbitrary first gain control amount information of one or morepieces of gain control amount information detected by the detectionmeans from one of the band signals and gain control amount informationcorresponding to a gain control amount of gain adjustment performed on apart adjacent to a part subjected to gain adjustment performed accordingto the gain control amount corresponding to the first gain controlamount information; retaining means for retaining a table indicating avalue-code correspondence in which a code with a small number of bits isassigned to a value having a high probability of being obtained as theresult of the calculation of the difference value performed by thecalculation means; gain control amount information encoding means forencoding the first gain control amount information such that a codecorresponding to the difference value calculated by the calculationmeans is retrieved from the table and the retrieved code is employed asthe code of the first gain control amount information; gain controlnumber encoding means for encoding a gain control number; and gaincontrol position information encoding means for encoding gain controlposition information indicating a particular value corresponding to again control position.

[0077] The table may indicate the correspondence of only one or moredifference values having high probabilities of being obtained as theresult of the calculation performed by the calculation means. In thiscase, when the correspondence of the calculated difference value is notfound in the table, the gain control amount information encoding meansmay encode an escape code and the first gain control amount information.

[0078] The present invention provides an eighth encoding methodcomprising a detection step of detecting gain control amount informationindicating a particular value corresponding to a gain control amount ofa band signal; a calculation step of calculating the difference valuebetween arbitrary first gain control amount information of one or morepieces of gain control amount information detected in the detection stepfrom one of the band signals and gain control amount informationcorresponding to a gain control amount of gain adjustment performed on apart adjacent to a part subjected to gain adjustment performed accordingto the gain control amount corresponding to the first gain controlamount information; a retaining step of retaining a table indicating avalue-code correspondence in which a code with a small number of bits isassigned to a value having a high probability of being obtained as theresult of the calculation of the difference value performed in thecalculation step; a gain control amount information encoding step ofencoding the first gain control amount information such that a codecorresponding to the difference value calculated in the calculation stepis retrieved from the table and the retrieved code is employed as thecode of the first gain control amount information; a gain control numberencoding step of encoding a gain control number; and a gain controlposition information encoding step of encoding gain control positioninformation indicating a particular value corresponding to a gaincontrol position.

[0079] In the eighth encoding apparatus and encoding method according tothe present invention, gain control amount information indicating aparticular value corresponding to a gain control amount of a band signalis detected; the difference value between arbitrary first gain controlamount information of one or more pieces of gain control amountinformation detected by the detection means from one of the band signalsand gain control amount information corresponding to a gain controlamount of gain adjustment performed on a part adjacent to a partsubjected to gain adjustment performed according to the gain controlamount corresponding to the first gain control amount information iscalculated; there is retained a table in which codes with small numbersof bits are assigned to values having high probabilities of beingobtained as the result of calculation of the difference value; a codecorresponding to the calculated difference value is retrieved from thetable and the retrieved code is employed as the code of the first gaincontrol amount information; the gain control number is encoded; and gaincontrol position information indicating a particular value correspondingto a gain control position is encoded.

[0080] The present invention provides a ninth encoding apparatuscomprising detection means for detecting gain control amount informationindicating a particular value corresponding to a gain control amount ofa first arbitrary band signal of band signals and detecting gain controlamount information indicating a particular value corresponding to a gaincontrol amount of a second band signal in a band adjacent to the band ofthe first band signal; calculation means for calculating the differencevalue between the first gain control amount information detected by thedetection means from the first band signal and the second gain controlamount information detected by the detection means from the second bandsignal; retaining means for retaining a table indicating a value-codecorrespondence in which a code with a small number of bits is assignedto a value having a high probability of being obtained as the result ofthe calculation of the difference value performed by the calculationmeans; gain control amount information encoding means for encoding thefirst gain control amount information such that a code corresponding tothe difference value calculated by the calculation means is retrievedfrom the table and the retrieved code is employed as the code of thefirst gain control amount information; gain control number encodingmeans for encoding a gain control number; and gain control positioninformation encoding means for encoding gain control positioninformation indicating a particular value corresponding to a gaincontrol position.

[0081] The table indicating the difference value versus codecorrespondence may include only one or more difference values havinghigh probabilities of being obtained as the result of the calculationperformed by the calculation means. In this case, when thecorrespondence of the calculated difference value is not found in thetable, the gain control amount information encoding means may encode anescape code and the gain control amount information.

[0082] The present invention provides a ninth encoding method comprisinga detection step of detecting gain control amount information indicatinga value corresponding to a gain control amount of a first arbitrary bandsignal of the band signals and detecting gain control amount informationindicating a value corresponding to a gain control amount of a secondband signal in a band adjacent to the band of the first band signal; acalculation step of calculating the difference value between first gaincontrol amount information detected in the detection step from the firstband signal and second gain control amount information detected in thedetection step from the second band signal; a retaining step ofretaining a table indicating a value-code correspondence in which a codewith a small number of bits is assigned to a value having a highprobability of being obtained as the result of the calculation of thedifference value performed in the calculation step; a gain controlamount information encoding step of encoding the first gain controlamount information such that a code corresponding to the differencevalue calculated in the calculation step is retrieved from the table andthe retrieved code is employed as the code of the first gain controlamount information; a gain control number encoding step of encoding again control number; and a gain control position information encodingstep of encoding gain control position information indicating aparticular value corresponding to a gain control position.

[0083] In the ninth encoding apparatus and encoding method according tothe present invention, gain control amount information indicating aparticular value corresponding to a gain control amount of a firstarbitrary band signal of band signals and also gain control amountinformation indicating a particular value corresponding to a gaincontrol amount of a second band signal in a band adjacent to the band ofthe first band signal are detected; the difference value between firstgain control amount information detected from the first band signal andsecond gain control amount information detected from the second bandsignal is calculated; there is retained a table in which codes withsmall numbers of bits are assigned to values having high probabilitiesof being obtained as the result of calculation of the difference value;a code corresponding to the calculated difference value is retrievedfrom the table and the retrieved code is employed as the code of thefirst gain control amount information; the gain control number isencoded; and gain control position information indicating a particularvalue corresponding to a gain control position is encoded.

[0084] The present invention provides a tenth encoding apparatuscomprising detection means for detecting gain control amount informationindicating a particular value corresponding to a gain control amount ofa first arbitrary band signal of band signals and detecting gain controlamount information indicating a particular value corresponding to a gaincontrol amount of a second band signal in a band adjacent to the band ofthe first band signal; first calculation means for calculating the firstdifference value between arbitrary first gain control amount informationof one or more pieces of gain control amount information detected by thedetection means from the first band signal and gain control amountinformation corresponding to a gain control amount of gain adjustmentperformed on a part adjacent to a part subjected to gain adjustmentperformed according to the gain control amount corresponding to thefirst gain control amount information and also calculating the seconddifference value between third gain control amount informationcorresponding to the first gain control amount information and fourthgain control amount information corresponding to the second gain controlamount information, the third gain control amount information and thefourth gain control amount information having been detected from thesecond band signal; second calculation means for calculating the thirddifference value between the first difference value and the seconddifference value; retaining means for retaining a table indicating avalue-code correspondence in which a code with a small. number of bitsis assigned to a value having a high probability of being obtained asthe third difference value in the calculation performed by the secondcalculation means; gain control amount information encoding means forencoding the first gain control amount information such that a codecorresponding to the third difference value calculated by the secondcalculation means is retrieved from the table and the retrieved code isemployed as the code of first gain control amount information; gaincontrol number encoding means for encoding a gain control number; andgain control position information encoding means for encoding gaincontrol position information indicating a particular value correspondingto a gain control position.

[0085] The table indicating the difference value versus codecorrespondence may include only one or more difference values havinghigh probabilities of being obtained as the result of the calculation ofthe third difference value performed by the calculation means. In thiscase, when the correspondence of the calculated third difference valueis not found in the table, the gain control amount information encodingmeans may encode an escape code and the first gain control amountinformation.

[0086] The present invention provides a tenth encoding method comprisinga detection step of detecting gain control amount information indicatinga value corresponding to a gain control amount of a first arbitrary bandsignal of the band signals and detecting gain control amount informationindicating a value corresponding to a gain control amount of a secondband signal in a band adjacent to the band of the first band signal; afirst calculation step for calculating the first difference valuebetween arbitrary first gain control amount information of one or morepieces of gain control amount information detected in the detection stepfrom the first band signal and gain control amount informationcorresponding to a gain control amount of gain adjustment performed on apart adjacent to a part subjected to gain adjustment performed accordingto the gain control amount corresponding to the first gain controlamount information and also calculating the second difference valuebetween third gain control amount information corresponding to the firstgain control amount information and fourth gain control amountinformation corresponding to the second gain control amount information,the third gain control amount information and the fourth gain controlamount information having been detected from the second band signal; asecond calculation step of calculating the third difference valuebetween the first difference value and the second difference value; aretaining step of retaining a table indicating a value-codecorrespondence in which a code with a small number of bits is assignedto a value having a high probability of being obtained as the thirddifference value in the calculation performed in the second calculationstep; a gain control amount information encoding step of encoding thefirst gain control amount information such that a code corresponding tothe third difference value calculated in the second calculation step isretrieved from the table and the retrieved code is employed as the codeof the first gain control amount information; a gain control numberencoding step of encoding a gain control number; and a gain controlposition information encoding step of encoding gain control positioninformation indicating a particular value corresponding to a gaincontrol position.

[0087] In the tenth encoding apparatus and encoding method according tothe present invention, gain control amount information indicating aparticular value corresponding to a gain control amount of a firstarbitrary band signal of band signals and also gain control amountinformation indicating a particular value corresponding to a gaincontrol amount of a second band signal in a band adjacent to the band ofthe first band signal are detected; the first difference value betweenarbitrary first gain control amount information of one or more pieces ofgain control amount information detected by the detection means from thefirst band signal and gain control amount information corresponding to again control amount of gain adjustment performed on a part adjacent to apart subjected to gain adjustment performed according to the gaincontrol amount corresponding to the first gain control amountinformation is calculated, and furthermore, the second difference valuebetween third gain control amount information corresponding to the firstgain control amount information and fourth gain control amountinformation corresponding to the second gain control amount information,the third gain control amount information and the fourth gain controlamount information having been detected from the second band signal iscalculated; the third difference value between the first differencevalue and the second difference value is calculated; there is retained atable in which codes with small numbers of bits are assigned to valueshaving high probabilities of being obtained as a result of calculationof the third difference value; a code corresponding to the calculatedthird difference value is retrieved from the table and the retrievedcode is employed as the code of the first gain control amountinformation; the gain control number is encoded; and gain controlposition information indicating a particular value corresponding to again control position is encoded.

[0088] The present invention provides an eleventh encoding apparatuscomprising detection means for detecting gain control amount informationindicating a particular value corresponding to gain control amountinformation of a first arbitrary band signal of band signals anddetecting gain control amount information indicating a particular valuecorresponding to gain control amount information of a second band signalin a band adjacent to the band of the first band signal; determinationmeans for determining whether first gain control amount informationdetected by the detection means from the first band signal and secondgain control amount information detected from the second band signal areequal to each other; gain control amount information encoding means forperforming encoding such that if the determination made by thedetermination means is affirmative, only a flag indicating that thefirst gain control amount information and second gain control amountinformation are equal to each other is encoded, while, if thedetermination made by the determination means is negative, both a flag,indicating that the first gain control amount information and secondgain control amount information are not equal to each other, and thesecond gain control amount information are encoded; gain control numberencoding means for encoding a gain control number; and gain controlposition information encoding means for encoding gain control positioninformation indicating a particular value corresponding to a gaincontrol position.

[0089] The present invention provides an eleventh encoding methodcomprising a detection step of detecting gain control amount informationindicating a value corresponding to gain control amount information of afirst arbitrary band signal of the band signals and detecting gaincontrol amount information indicating a value corresponding to gaincontrol amount information of a second band signal in a band adjacent tothe band of the first band signal; a determination step of determiningwhether first gain control amount information detected in the detectionstep from the first band signal and second gain control amountinformation detected in the detection step from the second band signalare equal to each other; a gain control amount information encoding stepof performing encoding such that if the determination made in thedetermination step is affirmative, only a flag indicating that the firstgain control amount information and second gain control amountinformation are equal to each other is encoded, while, if thedetermination made in the determination step is negative, both a flag,indicating that the first gain control amount information and secondgain control amount information are not equal to each other, and thesecond gain control amount information are encoded; a gain controlnumber encoding step of encoding a gain control number; and a gaincontrol position information encoding step of encoding gain controlposition information indicating a particular value corresponding to again control position.

[0090] In the eleventh encoding apparatus and encoding method accordingto the present invention, gain control amount information indicating aparticular value corresponding to gain control amount information of afirst arbitrary band signal of band signals and also gain control amountinformation indicating a particular value corresponding to a gaincontrol amount information of a second band signal in a band adjacent tothe band of the first band signal are detected; it is determined whetherfirst gain control amount information detected from the first bandsignal and second gain control amount information detected from thesecond band signal are equal to each other; if the result of thedetermination is affirmative, only a flag indicating that the first gaincontrol amount information and the second gain control amountinformation are equal to each other is encoded, while if the result ofthe determination is negative, a flag indicating that the first gaincontrol amount information and the second gain control amountinformation are not equal to each other and the second gain controlamount information are encoded; the gain control number is encoded; andgain control position information indicating a particular valuecorresponding to a gain control position is encoded.

[0091] The present invention provides a twelfth encoding apparatuscomprising detection means for detecting gain control amount informationindicating a particular value corresponding to a gain control amount ofa band signal; calculation means for calculating a smallest number ofbits which can represent the difference between the maximum and minimumvalues of the gain control amount information detected by the detectionmeans; gain control amount information encoding means for encoding thegain control amount information such that the minimum value determinedby the calculation means is encoded, a value obtained by subtracting theminimum value from the gain control amount information detected by thedetection means is expressed by as many bits as the number of bitscalculate by the calculation means, and a resultant expression isemployed as the code of the gain control amount information; gaincontrol number encoding means for encoding a gain control number; andgain control position information encoding means for encoding gaincontrol position information indicating a particular value correspondingto a gain control position.

[0092] The calculation means may calculate a smallest number of bitswhich can represent the difference between the maximum and minimumvalues of one or more pieces of gain control amount information detectedby the detection means from one band signal; and the gain control amountinformation encoding means may encode the gain control amountinformation such that values obtained by subtracting the minimum valuefrom the one or more pieces of gain control amount information areexpressed by as many bits as the number of bits calculate by thecalculation means and resultant expressions are employed as the codes ofthe one or more pieces of gain control amount information.

[0093] The present invention provides a twelfth encoding methodcomprising a detection step of detecting gain control amount informationindicating a particular value corresponding to a gain control amount ofa band signal; a calculation step of calculating a smallest number ofbits which can represent the difference between the maximum and minimumvalues of the gain control amount information detected in the detectionstep; a gain control amount information encoding step for encoding thegain control amount information such that the minimum value determinedin the calculation step is encoded, a value obtained by subtracting theminimum value from the gain control amount information detected in thedetection step is expressed by as many bits as the number of bitscalculated in the calculation step, and a resultant expression isemployed as the code of the gain control amount information; a gaincontrol number encoding step of encoding a gain control number; and again control position information encoding step of encoding gain controlposition information indicating a particular value corresponding to again control position.

[0094] In the twelfth encoding apparatus and encoding method accordingto the present invention, gain control amount information indicating aparticular value corresponding to a gain control amount of a band signalis detected; the smallest number of bits which can represent thedifference between the maximum and minimum values of the detected gaincontrol amount information is calculated; the determined minimum valueis encoded and furthermore gain control amount information is encodedsuch that values obtained by subtracting the minimum value from thedetected pieces of gain control amount information are expressed by asmany bits as the smallest number of bits calculate above, and resultantexpressions are employed as the codes of the respective pieces of gaincontrol amount information; the gain control number is encoded; and gaincontrol position information indicating a particular value correspondingto a gain control position is encoded.

[0095] The present invention provides a thirteenth encoding apparatuscomprising detection means for detecting gain control amount informationindicating a particular value corresponding to a gain control amount ofa band signal of a left-channel signal and that of a band signal of aright-channel signal in the same band as that of the band signal of theleft-channel signal; calculation means for calculating the differencevalue between the first gain control amount information detected by thedetection means from the band signal of the left-channel signal and thesecond gain control amount information detected by the detection meansfrom the band signal of the right-channel signal; retaining means forretaining a table indicating a value-code correspondence in which a codewith a small number of bits is assigned to a value having a highprobability of being obtained as the result of the calculation of thedifference value performed by the calculation means; gain control amountinformation encoding means for encoding the first or second gain controlamount information such that a code corresponding to the differencevalue calculated by the calculation means is retrieved from the tableand the retrieved code is employed as the code of the first or secondgain control amount information; gain control number encoding means forencoding a gain control number; and gain control position informationencoding means for encoding gain control position information indicatinga particular value corresponding to a gain control position.

[0096] The table indicating the difference value versus codecorrespondence may include only one or more difference values havinghigh probabilities of being obtained as the result of the calculationperformed by the calculation means. In this case, when thecorrespondence of the calculated difference value is not found in thetable, the gain control amount information encoding means may encode anescape code and the gain control amount information.

[0097] The present invention provides a thirteenth encoding methodcomprising a detection step, of detecting gain control amountinformation indicating a particular value corresponding to a gaincontrol amount of a band signal of a left-channel signal and that of aband signal of a right-channel signal in the same band as that of theband signal of the left-channel signal; a calculation step ofcalculating the difference value between first gain control amountinformation detected in the detection step from the band signal of theleft-channel signal and the second gain control amount informationdetected in the detection step from the band signal of the right-channelsignal; a retaining step of retaining a table indicating a value-codecorrespondence in which a code with a small number of bits is assignedto a value having a high probability of being obtained as the result ofthe calculation of the difference value performed in the calculationstep; a gain control amount information encoding step of encoding thefirst or second gain control amount information such that a codecorresponding to the difference value calculated in the calculation stepis retrieved from the table and the retrieved code is employed as thecode of the first or second gain control amount information; a gaincontrol number encoding step of encoding a gain control number; and again control position information encoding step of encoding gain controlposition information indicating a particular value corresponding to again control position.

[0098] In the thirteenth encoding apparatus and encoding methodaccording to the present invention, gain control amount informationindicating a particular value corresponding to a gain control amount ofa band signal of a left-channel signal and that of a band signal of aright-channel signal in the same band as that of the band signal of theleft-channel signal are detected; the difference value between firstgain control amount information detected from the band signal of theleft-channel signal and second gain control amount information detectedfrom the band signal of the right-channel signal is calculated; there isretained a table in which codes with small numbers of bits are assignedto values having high probabilities of being obtained as the result ofcalculation of the difference value; a code corresponding to thecalculated difference value is retrieved from the table and theretrieved code is employed as the code of the first or second gaincontrol amount information; the gain control number is encoded; and gaincontrol position information indicating a particular value correspondingto a gain control position is encoded.

[0099] The present invention provides a fourteenth encoding apparatuscomprising detection means for detecting gain control amount informationindicating a particular value corresponding to a gain control amount ofan arbitrary band signal of a left-channel signal and that of a bandsignal of a right-channel signal in the same band as that of the bandsignal of the left-channel signal; determination means for determiningwhether gain control amount information detected by the detection meansfrom a band signal of the left-channel signal and second gain controlamount information detected by the detection means from a band signal ofthe right-channel signal are equal to each other; gain control amountinformation encoding means for performing encoding such that if thedetermination made by the determination means is affirmative, a flagindicating that the first gain control amount information and the secondgain control amount information are equal to each other and the first orsecond gain control amount information are encoded, while, if thedetermination made by the determination means is negative, a flagindicating that the first gain control amount information and the secondgain control amount information are not equal to each other, the firstgain control amount information, and the second and gain control amountinformation are encoded; gain control number encoding means for encodinga gain control number; and gain control position information encodingmeans for encoding gain control position information indicating aparticular value corresponding to a gain control position.

[0100] The present invention provides a fourteenth encoding methodcomprising a detection step, of detecting gain control amountinformation indicating a particular value corresponding to a gaincontrol amount of an arbitrary band signal of a left-channel signal andthat of a band signal of a right-channel signal in the same band as thatof the band signal of the left-channel signal; a determination step ofdetermining whether first gain control amount information detected inthe detection step from the band signal of the left-channel signal andsecond gain control amount information detected in the detection stepfrom the band signal of the right-channel signal are equal to eachother; a gain control amount information encoding step of performingencoding such that if the determination made in the determination stepis affirmative, a flag indicating that the first gain control amountinformation and the second gain control amount information are equal toeach other and the first or second gain control amount information areencoded, while, if the determination made in the determination step isnegative, a flag indicating that the first gain control amountinformation and the second gain control amount information are not equalto each other, the first gain control amount information, and the secondand gain control amount information are encoded; a gain control numberencoding step of encoding a gain control number; and a gain controlposition information encoding step of encoding gain control positioninformation indicating a particular value corresponding to a gaincontrol position.

[0101] In the fourteenth encoding apparatus and encoding methodaccording to the present invention, gain control amount informationindicating a particular value corresponding to a gain control amount ofan arbitrary band signal of a left-channel signal and that of a bandsignal of a right-channel signal in the same band as that of the bandsignal of the left-channel signal are detected; it is determined whethergain control amount information detected from a band signal of theleft-channel signal and second gain control amount information detectedby the detection means from a band signal of the right-channel signalare equal to each other; if the result of the determination isaffirmative, a flag indicating that the first gain control amountinformation and the second gain control amount information are equal toeach other and the first or second gain control amount information areencoded, while if the result of the determination is negative, a flagindicating that the first gain control amount information and the secondgain control amount information are not equal to each other and thefirst and second gain control amount information are encoded; the gaincontrol number is encoded; and gain control position informationindicating a particular value corresponding to a gain control positionis encoded.

[0102] The present invention provides a fifteenth encoding apparatuscomprising detection means for detecting gain control amount informationindicating a particular value corresponding to a gain control amount ofa band signal of a left-channel signal and that of a band signal of aright-channel signal; determination means for determining whether gaincontrol amount information detected by the detection means from the bandsignals of the left-channel signal and gain control amount informationdetected by the detection means from the corresponding band signals ofthe right-channel signal are equal to each other for all bands; gaincontrol amount information encoding means for performing encoding suchthat if the determination made by the determination means isaffirmative, the first or second gain control amount information isencoded, while, if the determination made by the determination means isnegative, the first gain control amount information and the second gaincontrol amount information are encoded; gain control number encodingmeans for encoding a gain control number; and gain control positioninformation encoding means for encoding gain control positioninformation indicating a particular value corresponding to a gaincontrol position.

[0103] The present invention provides a fifteenth encoding methodcomprising detection step for detecting gain control amount informationindicating a particular value corresponding to a gain control amount ofa band signal of a left-channel signal and that of a band signal of aright-channel signal; a determination step of determining whether gaincontrol amount information detected in the detection step from the bandsignals of the left-channel signal and gain control amount informationdetected in the detection step from the band signals of theright-channel signal are equal to each other in each of all bands; again control amount information encoding step of performing encodingsuch that if the determination made in the determination step isaffirmative, the first or second gain control amount information isencoded, while, if the determination made in the determination step isnegative, the first gain control amount information and the second gaincontrol amount information are encoded; a gain control number encodingstep of encoding a gain control number; and a gain control positioninformation encoding step of encoding gain control position informationindicating a particular value corresponding to a gain control position.

[0104] In the fifteenth encoding apparatus and encoding method accordingto the present invention, gain control amount information indicating aparticular value corresponding to a gain control amount of a band signalof a left-channel signal and that of a band signal of a right-channelsignal are detected; it is determined whether gain control amountinformation detected from the band signals of the left-channel signaland gain control amount information detected from the corresponding bandsignals of the right-channel signal are equal to each other for allbands; if the result of the determination is affirmative, the first orsecond gain control amount information is encoded, while if the resultof the determination is negative, the first gain control amountinformation and the second gain control amount information are encoded;the gain control number is encoded; and gain control positioninformation indicating a particular value corresponding to a gaincontrol position is encoded.

[0105] The present invention provides a sixteenth encoding apparatuscomprising detection means for detecting gain control amount informationindicating a particular value corresponding to a gain control amount ofan arbitrary band signal of a left-channel signal and that of a bandsignal of a right-channel signal in the same band as that of the bandsignal of the left-channel signal; first calculation means forcalculating the first difference value between arbitrary first gaincontrol amount information of one or more pieces of gain control amountinformation detected by the detection means from the band signal of theleft-channel signal and gain control amount information corresponding toa gain control amount of gain adjustment performed on a part adjacent toa part subjected to gain adjustment performed according to the gaincontrol amount corresponding to the first gain control amountinformation and also calculating the second difference value betweenthird and fourth gain control amount information of one or more piecesof gain control amount information detected from the band signal of theright-channel signal, the third gain control amount information and thefourth gain control amount information corresponding to the first gaincontrol amount information and the second gain control amountinformation, respectively; second calculation means for calculating thethird difference value between the first difference value and the seconddifference value; retaining means for retaining a table indicating avalue-code correspondence in which a code with a small number of bits isassigned to a value having a high probability of being obtained as thethird difference value in the calculation performed by the secondcalculation means; gain control amount information encoding means forencoding the first gain control amount information such that a codecorresponding to the third difference value calculated by the secondcalculation means is retrieved from the table and the retrieved code isemployed as the code of first gain control amount information; gaincontrol number encoding means for encoding a gain control number; andgain control position information encoding means for encoding gaincontrol position information indicating a particular value correspondingto a gain control position.

[0106] The table indicating the difference value versus codecorrespondence may include only one or more difference values havinghigh probabilities of being obtained as the result of the calculationperformed by the calculation means. In this case, when thecorrespondence of the calculated third difference value is not found inthe table, the gain control amount information encoding means may encodean escape code and the first gain control amount information.

[0107] The present invention provides a sixteenth encoding methodcomprising a detection step, of detecting gain control amountinformation indicating a particular value corresponding to a gaincontrol amount of an arbitrary band signal of a left-channel signal andthat of a band signal of a right-channel signal in the same band as thatof the band signal of the left-channel signal; a first calculation stepof calculating the first difference value between arbitrary first gaincontrol amount information of one or more pieces of gain control amountinformation detected by in detection step from the band signal of theleft-channel signal and gain control amount information corresponding toa gain control amount of gain adjustment performed on a part adjacent toa part subjected to gain adjustment performed according to the gaincontrol amount corresponding to the first gain control amountinformation and also calculating the second difference value betweenthird and fourth gain control amount information of one or more piecesof gain control amount information detected from the band signal of theright-channel signal, the third gain control amount information and thefourth gain control amount information corresponding to the first gaincontrol amount information and the second gain control amountinformation, respectively; a second calculation step of calculating thethird difference value between the first difference value and the seconddifference value; a retaining step of retaining a table indicating avalue-code correspondence in which a code with a small number of bits isassigned to a value having a high probability of being obtained as thethird difference value in the calculation performed in the secondcalculation step; a gain control amount information encoding step ofencoding the first gain control amount information such that a codecorresponding to the third difference value calculated in the secondcalculation step is retrieved from the table and the retrieved code isemployed as the code of the first gain control amount information; again control number encoding step of encoding a gain control number; anda gain control position information encoding step of encoding gaincontrol position information indicating a particular value correspondingto a gain control position.

[0108] In the sixteenth encoding apparatus and encoding method accordingto the present invention, gain control amount information indicating aparticular value corresponding to a gain control amount of an arbitraryband signal of a left-channel signal and that of a band signal of aright-channel signal in the same band as that of the band signal of theleft-channel signal are detected; the first difference value betweenarbitrary first gain control amount information of one or more pieces ofgain control amount information detected from the band signal of theleft-channel signal and gain control amount information corresponding toa gain control amount of gain adjustment performed on a part adjacent toa part subjected to gain adjustment performed according to the gaincontrol amount corresponding to the first gain control amountinformation is calculated, and furthermore, the second difference valuebetween third and fourth gain control amount information of one or morepieces of gain control amount information detected from the band signalof the right-channel signal is calculated, wherein the third gaincontrol amount information and the fourth gain control amountinformation correspond to the first gain control amount information andthe second gain control amount information, respectively; the thirddifference value between the first difference value and the seconddifference value is calculated; there is retained a table in which codeswith small numbers of bits are assigned to values having highprobabilities of being obtained as the result of calculation of thethird difference value; a code corresponding to the calculated thirddifference value is retrieved from the table and the retrieved code isemployed as the code of the first gain control amount information; thegain control number is encoded; and gain control position informationindicating a particular value corresponding to a gain control positionis encoded.

[0109] The present invention provides a seventh encoding apparatuscomprising detection means for detecting gain control amount informationindicating values corresponding to gain control amounts of an arbitraryfirst band signal, a second band signal, a third band signal, and afourth band signal, respectively, the first band signal and the secondband signal being of band signals of a left-channel signal, the secondband signal being of a band adjacent to a band of the first band signal,the third band signal and the fourth band signal being of band signalsof a right-channel signal, the third band signal corresponding to thefirst band signal, the fourth band signal corresponding to the secondband signal; first calculation means for calculating the differencevalue between first gain control amount information detected by thedetection means from the first band signal and second gain controlamount information detected by the detection means from the second bandsignal; second calculation means for calculating the differenc valuebetween third gain control amount information detected from the thirdband signal and fourth gain control amount information detected from thefourth band signal; third calculation means for calculating thedifference value second calculation means; retaining means for retaininga table indicating a value-code correspondence in which a code with asmall number of bits is assigned to value having a high probability ofbeing obtained as the result of the calculation of the difference valueperformed by the third calculation means; gain control amountinformation encoding means for encoding the first gain control amountinformation such that a code corresponding to the difference valuecalculated by the third calculation means is retrieved from the tableand the retrieved code is employed as the code of the first gain controlamount information; gain control number encoding means for encoding again control number; and gain control position information encodingmeans for encoding gain control position information indicating aparticular value corresponding to a gain control position.

[0110] The table indicating the difference value versus codecorrespondence may include only one or more difference values havinghigh probabilities of being obtained as the result of the calculationperformed by the third calculation means. In this case, when thecorrespondence of the calculated difference value is not found in thetable, the gain control amount information encoding means may encode anescape code and the first gain control amount information.

[0111] The present invention provides a seventh encoding methodcomprising a detection step of detecting gain control amount informationindicating values corresponding to gain control amounts of an arbitraryfirst band signal, a second band signal, a third band signal, and afourth band signal, respectively, the first band signal and the secondband signal being of band signals of a left-channel signal, the secondband signal being of a band adjacent to a band of the first band signal,the third band signal and the fourth band signal being of band signalsof a right-channel signal, the third band signal corresponding to thefirst band signal, the fourth band signal corresponding to the secondband signal; a first calculation step of calculating the differencevalue between first gain control amount information detected in thedetection step from the first band signal and second gain control amountinformation detected in the detection step from the second band signal;a second calculation step of calculating the difference value betweenthird gain control amount information detected from the third bandsignal and fourth gain control amount information detected from thefourth band signal; a third calculation step of calculating thedifference value between the difference value calculated in the firstcalculation step and the difference value calculated in the secondcalculation step; a retaining step of retaining a table indicating avalue-code correspondence in which a code with a small number of bits isassigned to a value having a high probability of being obtained as theresult of the calculation of the difference value performed in the thirdcalculation step; a gain control amount information encoding step ofencoding the first gain control amount information such that a codecorresponding to the difference value calculated in the thirdcalculation step is retrieved from the table and the retrieved code isemployed as the code of the first gain control amount information; again control number encoding step of encoding a gain control number; anda gain control position information encoding step of encoding gaincontrol position information indicating a particular value correspondingto a gain control position.

[0112] In the seventh encoding apparatus and encoding method accordingto the present invention, gain control amount information indicatingvalues corresponding to gain control amounts of an arbitrary first bandsignal, a second band signal, a third band signal, and a fourth bandsignal are detected, wherein the first band signal and the second bandsignal are of band signals of a left-channel signal, the second bandsignal is of a band adjacent to a band of the first band signal, thethird band signal and the fourth band signal are of band signals of aright-channel signal, the third band signal corresponds to the firstband signal, and the fourth band signal corresponds to the second bandsignal; the difference value between first gain control amountinformation detected from the first band signal and second gain controlamount information detected from the second band signal is calculated;the difference value between third gain control amount informationdetected from the third band signal and fourth gain control amountinformation detected from the fourth band signal is calculated; thedifference value between the calculated difference values is furthercalculated; there is retained a table in which codes with small numbersof bits are assigned to values having high probabilities of beingobtained as the result of calculation of the difference value; a codecorresponding to the calculated difference value is retrieved from thetable and the retrieved code is employed as the code of the first gaincontrol amount information; the gain control number is encoded; and gaincontrol position information indicating a particular value correspondingto a gain control position is encoded.

[0113] The present invention provides an eighteenth encoding apparatuscomprising detection means for detecting gain control positioninformation indicating a particular value corresponding to a gaincontrol position of a band signal; gain control position informationencoding means for encoding gain control position information such thata value represented by a particular number of bits indicating thedifference between first gain control position information of one ormore pieces of gain control position information detected by thedetection means from one of the band signals and gain control positioninformation corresponding to a gain control position of a part adjacentto a part indicated by a gain control position corresponding to thefirst gain control position information is employed as the code of thefirst gain control position information; gain control number encodingmeans for encoding a gain control number; and gain control amountinformation encoding means for encoding gain control amount informationindicating a particular value corresponding to a gain control amount.

[0114] The present invention provides an eighteenth encoding methodcomprising a detection step, of detecting gain control positioninformation indicating a particular value corresponding to a gaincontrol position of a band signal; a gain control position informationencoding step of encoding gain control position information such that avalue represented by a particular number of bits indicating thedifference between first gain control position information of one ormore pieces of gain control position information detected in thedetection step from one of the band signals and gain control positioninformation corresponding to a gain control position of a part adjacentto a part indicated by a gain control position corresponding to thefirst gain control position information is employed as the code of thefirst gain control position information; a gain control number encodingstep of encoding a gain control number; and a gain control amountinformation encoding step of encoding gain control amount informationindicating a particular value corresponding to a gain control amount.

[0115] In the eighteenth encoding apparatus and encoding methodaccording to the present invention, gain control position informationindicating a particular value corresponding to a gain control positionof a band signal is detected; gain control position information isencoded such that a value represented by a particular number of bitsindicating the difference between first gain control positioninformation of one or more pieces of gain control position informationdetected from one of the band signals and gain control positioninformation corresponding to a gain control position of a part adjacentto a part indicated by a gain control position corresponding to thefirst gain control position information is employed as the code of thefirst gain control position information; the gain control number isencoded; and gain control amount information indicating a particularvalue corresponding to a gain control amount is encoded.

[0116] The present invention provides a nineteenth encoding apparatuscomprising detection means for detecting gain control positioninformation indicating a particular value corresponding to a gaincontrol position of a band signal; calculation means for calculating thedifference value between arbitrary first gain control positioninformation of one or more pieces of gain control position informationdetected by the detection means from one of the band signals and gaincontrol position information corresponding to the gain control positionof a part adjacent to a part indicated by the gain control positioncorresponding to the first gain control position information; retainingmeans for retaining a table indicating a value-code correspondence inwhich a code with a small number of bits is assigned to a value having ahigh probability of being obtained as the result of the calculation ofthe difference value performed by the calculation means; gain controlposition information encoding means for encoding the first gain controlposition information such that a code corresponding to the differencevalue calculated by the calculation means is retrieved from the tableand the retrieved code is employed as the code of the first gain controlposition information; gain control number encoding means for encoding again control number; and gain control amount information encoding meansfor encoding gain control amount information indicating a particularvalue corresponding to a gain control amount.

[0117] The table indicating the difference value versus codecorrespondence may include only one or more difference values havinghigh probabilities of being obtained as the result of the calculationperformed by the calculation means. In this case, when thecorrespondence of the calculated difference value is not found in thetable, the gain control position information encoding means may encodean escape code and the first gain control position information. Theretaining means retains a first table indicating a value-codecorrespondence which is applied when the first gain control positioninformation indicates a position of an attack portion and in which acode with a small number of bits is assigned to a value having a highprobability of being obtained as the result of the calculation of thedifference value performed by the calculation means, and also retaininga second table indicating a value-code correspondence which is appliedwhen the first gain control position information indicates a position ofa release portion and in which a code with a small number of bits isassigned to a value having a high probability of being obtained as theresult of the calculation of the difference value performed by thecalculation means; and the first encoding means performs encoding of thefirst gain control position information such that when the first gaincontrol position information corresponds to the position of an attackportion, a code corresponding to the difference value is retrieved fromthe first table and the retrieved code is employed as the code of thefirst gain control position information, while when the first gaincontrol position information corresponds to the position of a releaseportion, a code corresponding to the difference value is retrieved fromthe second table and the retrieved code is employed as the code of thefirst gain control position information.

[0118] The present invention provides a nineteenth encoding methodcomprising a detection step, of detecting gain control positioninformation indicating a particular value corresponding to a gaincontrol position of a band signal; a calculation step for calculatingthe difference value between arbitrary first gain control positioninformation of one or more pieces of gain control position informationdetected in the detection step from one of the band signals and gaincontrol position information corresponding to the gain control positionof a part adjacent to a part indicated by the gain control positioncorresponding to the first gain control position information; aretaining step of retaining a table indicating a value-codecorrespondence in which a code with a small number of bits is assignedto a value having a high probability of being obtained as the result ofthe calculation of the difference value performed in the calculationstep; a gain control position information encoding step of encoding thefirst gain control position information such that a code correspondingto the difference value calculated in the calculation step is retrievedfrom the table and the retrieved code is employed as the code of thefirst gain control position information; a gain control number encodingstep of encoding a gain control number; and a gain control amountinformation encoding step of encoding gain control amount informationindicating a particular value corresponding to a gain control amount.

[0119] In the nineteenth encoding apparatus and encoding methodaccording to the present invention, gain control position informationindicating a particular value corresponding to a gain control positionof a band signal is detected; the difference value between arbitraryfirst gain control position information of one or more pieces of gaincontrol position information detected from one of the band signals andgain control position information corresponding to the gain controlposition of a part adjacent to a part indicated by the gain controlposition corresponding to the first gain control position information iscalculated; there is retained a table in which codes with small numbersof bits are assigned to values having high probabilities of beingobtained as the result of calculation of the difference value; a codecorresponding to the calculated difference value is retrieved from thetable and the retrieved code is employed as the code of the first gaincontrol position information; the gain control number is encoded; andgain control amount information indicating a particular valuecorresponding to a gain control amount is encoded.

[0120] The present invention provides a twentieth encoding apparatuscomprising detection means for detecting a gain control positioninformation indicating a value corresponding to a gain control positionof a first arbitrary band signal of the band signals and detecting gaincontrol position information indicating a value corresponding to a gaincontrol position of a second band signal in a band adjacent to the bandof the first band signal; calculation means for calculating thedifference value between the first gain control position informationdetected by the detection means from the first band signal and thesecond gain control position information detected by the detection meansfrom the second band signal; retaining means for retaining a tableindicating a value-code correspondence in which a code with a smallnumber of bits is assigned to a value having a high probability of beingobtained as the result of the calculation of the difference valueperformed by the calculation means; gain control position informationencoding means for encoding the first gain control position informationsuch that a code corresponding to the difference value calculated by thecalculation means is retrieved from the table and the retrieved code isemployed as the code of the first gain control position information;gain control number encoding means for encoding a gain control number;and gain control amount information encoding means for encoding gaincontrol amount information indicating a particular value correspondingto a gain control amount.

[0121] The table indicating the difference value versus codecorrespondence may include only one or more difference values havinghigh probabilities of being obtained as the result of the calculationperformed by the calculation means. In this case, when thecorrespondence of the calculated difference value is not found in thetable, the gain control position information encoding means may encodean escape code and the first gain control position information.

[0122] The retaining means retains a first table indicating a value-codecorrespondence which is applied when the first gain control positioninformation indicates a position of an attack portion and in which acode with a small number of bits is assigned to a value having a highprobability of being obtained as the result of the calculation of thedifference value performed by the calculation means, and also retaininga second table indicating a value-code correspondence which is appliedwhen the first gain control position information indicates a position ofa release portion and in which a code with a small number of bits isassigned to a value having a high probability of being obtained as theresult of the calculation of the difference value performed by thecalculation means; and the first encoding means performs encoding of thefirst gain control position information such that when the first gaincontrol position information corresponds to the position of an attackportion, a code corresponding to the difference value is retrieved fromthe first table and the retrieved code is employed as the code of thefirst gain control position information, while when the first gaincontrol position information corresponds to the position of a releaseportion, a code corresponding to the difference value is retrieved fromthe second table and the retrieved code is employed as the code of thefirst gain control position information.

[0123] The present invention provides a twentieth encoding methodcomprising a detection step of detecting gain control positioninformation indicating a particular value corresponding to a gaincontrol position of a first arbitrary band signal of band signals andgain control position information indicating a particular valuecorresponding to a gain control position of a second band signal in aband adjacent to the band of the first band signal; a calculation stepof calculating the difference value between first gain control positioninformation detected in the detection step from the first band signaland second gain control position information detected in the detectionstep from the second band signal; a retaining step of retaining a tableindicating a value-code correspondence in which a code with a smallnumber of bits is assigned to a value having a high probability of beingobtained as the result of the calculation of the difference valueperformed in the calculation step; a gain control position informationencoding step of encoding the first gain control position informationsuch that a code corresponding to the difference value calculated in thecalculation step is retrieved from the table and the retrieved code isemployed as the code of the first gain control position information; again control number encoding step of encoding a gain control number; anda gain control amount information encoding step of encoding gain controlamount information indicating a particular value corresponding to a gaincontrol amount.

[0124] In the twentieth encoding apparatus and encoding method accordingto the present invention, gain control position information indicating aparticular value corresponding to a gain control position of a firstarbitrary band signal of band signals and also gain control positioninformation indicating a particular value corresponding to a gaincontrol position of a second band signal in a band adjacent to the bandof the first band signal are detected; the difference value betweenfirst gain control position information detected from the first bandsignal and second gain control position information detected from thesecond band signal is calculated; there is retained a table in whichcodes with small numbers of bits are assigned to values having highprobabilities of being obtained as the result of calculation of thedifference value; a code corresponding to the calculated differencevalue is retrieved from the table and the retrieved code is employed asthe code of the first gain control position information; the gaincontrol number is encoded; and gain control amount informationindicating a particular value corresponding to a gain control amount isencoded.

[0125] The present invention provides a twenty-first encoding apparatuscomprising detection means for detecting a gain control positioninformation indicating a value corresponding to a gain control positionof a first arbitrary band signal of the band signals and detecting gaincontrol position information indicating a value corresponding to a gaincontrol position of a second band signal in a band adjacent to the bandof the first band signal; first calculation means for calculating thefirst difference value between arbitrary first gain control positioninformation of one or more pieces of gain control position informationdetected by the detection means from the first band signal and gaincontrol position information corresponding to the gain control positionof a part adjacent to a part indicated by the gain control positioncorresponding to the first gain control position information and alsocalculating the second difference value between third gain controlposition information corresponding to the first gain control positioninformation and fourth gain control position information correspondingto the second gain control position information, the third gain controlposition information and the fourth gain control position informationhaving been detected from the second band signal; second calculationmeans for calculating the third difference value between the firstdifference value and the second difference value; retaining means forretaining a table indicating a value-code correspondence in which a codewith a small number of bits is assigned to a value having a highprobability of being obtained as the third difference value in thecalculation performed by the second calculation means; gain controlposition information encoding means for encoding the first gain controlposition information such that a code corresponding to the thirddifference value calculated by the second calculation means is retrievedfrom the table and the retrieved code is employed as the code of firstgain control position information; gain control number encoding meansfor encoding a gain control number; and gain control amount informationencoding means for encoding gain control amount information indicating aparticular value corresponding to a gain control amount.

[0126] The table indicating the difference value versus codecorrespondence may include only one or more difference values havinghigh probabilities of being obtained as the result of the calculation ofthe third difference value performed by the calculation means. In thiscase, when the correspondence of the calculated third difference valueis not found in the table, the gain control position informationencoding means may encode an escape code and the first gain controlposition information.

[0127] The retaining means retaining means a first table indicating avalue-code correspondence which is applied when the first gain controlposition information indicates a position of an attack portion and inwhich a code with a small number of bits is assigned to a thirddifference value having a high probability of being obtained as a resultof the calculation performed by the second calculation means, and alsoretaining a second table indicating a value-code correspondence which isapplied when the first gain control position information indicates aposition of a release portion and in which a code with a small number ofbits is assigned to a third difference value having a high probabilityof being obtained as a result of the calculation performed by the secondcalculation means; and the first encoding means performs encoding of thefirst gain control position information such that when the first gaincontrol position information corresponds to the position of an attackportion, a code corresponding to the third difference value is retrievedfrom the first table and the retrieved code is employed as the code ofthe first gain control position information, while when the first gaincontrol position information corresponds to the position of a releaseportion, a code corresponding to the third difference value is retrievedfrom the second table and the retrieved code is employed as the code ofthe first gain control position information.

[0128] The present invention provides a twenty-first encoding methodcomprising a detection step of detecting gain control positioninformation indicating a particular value corresponding to a gaincontrol position of a first arbitrary band signal of band signals andgain control position information indicating a particular valuecorresponding to a gain control position of a second band signal in aband adjacent to the band of the first band signal; a first calculationstep of calculating the first difference value between arbitrary firstgain control position information of one or more pieces of gain controlposition information detected in the detection step from the first bandsignal and gain control position information corresponding to the gaincontrol position of a part adjacent to a part indicated by the gaincontrol position corresponding to the first gain control positioninformation and also calculating the second difference value betweenthird gain control position information corresponding to the first gaincontrol position information and fourth gain control positioninformation corresponding to the second gain control positioninformation, the third gain control position information and the fourthgain control position information having been detected from the secondband signal; a second calculation step of calculating the thirddifference value between the first difference value and the seconddifference value; a retaining step of retaining a table indicating avalue-code correspondence in which a code with a small number of bits isassigned to a value having a high probability of being obtained as thethird difference value in the calculation performed in the secondcalculation step; a gain control position information encoding step ofencoding the first gain control position information such that a codecorresponding to the third difference value calculated in the secondcalculation step is retrieved from the table and the retrieved code isemployed as the code of the first gain control position information; again control number encoding step of encoding a gain control number; anda gain control amount information encoding step of encoding gain controlamount information indicating a particular value corresponding to a gaincontrol amount.

[0129] In the twenty-first encoding apparatus and encoding methodaccording to the present invention, gain control position informationindicating a particular value corresponding to a gain control positionof a first arbitrary band signal of band signals and also gain controlposition information indicating a particular value corresponding to again control position of a second band signal in a band adjacent to theband of the first band signal are detected; the first difference valuebetween arbitrary first gain control position information of one or morepieces of gain control position information detected from the first bandsignal and gain control position information corresponding to the gaincontrol position of a part adjacent to a part indicated by the gaincontrol position corresponding to the first gain control positioninformation is calculated, and furthermore, the second difference valuebetween third gain control position information and fourth gain controlposition information detected from the second band signal is calculated,wherein the third gain control position information and the fourth gaincontrol position information correspond to the first gain controlposition information and the second gain control position information,respectively; the third difference value between the first differencevalue and the second difference value is calculated; there is retained atable in which codes with small numbers of bits are assigned to valueshaving high probabilities of being obtained as a result of calculationof the third difference value; a code corresponding to the calculatedthird difference value is retrieved from the table and the retrievedcode is employed as the code of the first gain control positioninformation; the gain control number is encoded; and gain control amountinformation indicating a particular value corresponding to a gaincontrol amount is encoded.

[0130] The present invention provides a twenty-second encoding apparatuscomprising detection means for detecting gain control positioninformation indicating a value corresponding to a gain control positioninformation of a first arbitrary band signal of band signals anddetecting gain control position information indicating a valuecorresponding to a gain control position information of a second bandsignal of a band adjacent to the band of the first band signal;determination means for determining whether first gain control positioninformation detected by the detection means from the first band signaland second gain control position information detected from the secondband signal are equal to each other; gain control position informationencoding means for performing encoding such that if the determinationmade by the determination means is affirmative, only a flag indicatingthat the first gain control position information and second gain controlposition information are equal to each other is encoded, while, if thedetermination made by the determination means is negative, both a flag,indicating that the first gain control position information and secondgain control position information are not equal to each other, and thesecond gain control position information are encoded; gain controlnumber encoding means for encoding a gain control number; and gaincontrol amount information encoding means for encoding gain controlamount information indicating a particular value corresponding to a gaincontrol amount.

[0131] The present invention provides a twenty-second encoding methodcomprising a detection step of detecting gain control positioninformation indicating a particular value corresponding to a gaincontrol position information of a first arbitrary band signal of bandsignals and gain control position information indicating a particularvalue corresponding to a gain control position information of a secondband signal in a band adjacent to the band of the first band signal; adetermination step of determining whether the first gain controlposition information detected in the detection step from the first bandsignal is equal to the second gain control position information detectedin the detection step from the second band signal; a gain controlposition information encoding step of performing encoding such that ifthe determination made in the determination step is affirmative, only aflag indicating that the first gain control position information andsecond gain control position information are equal to each other isencoded, while, if the determination made in the determination step isnegative, both a flag, indicating that the first gain control positioninformation and second gain control position information are not equalto each other, and the second gain control position information areencoded; a gain control number encoding step of encoding a gain controlnumber; and a gain control amount information encoding step of encodinggain control amount information indicating a particular valuecorresponding to a gain control amount.

[0132] In the twenty-second encoding apparatus and encoding methodaccording to the present invention, gain control position informationindicating a particular value corresponding to a gain control positioninformation of a first arbitrary band signal of band signals and alsogain control position information indicating a particular valuecorresponding to a gain control position information of a second bandsignal in a band adjacent to the band of the first band signal aredetected; it is determined whether first gain control positioninformation detected from the first band signal and second gain controlposition information detected from the second band signal are equal toeach other; if the result of the determination is affirmative, only aflag indicating that the first gain control position information and thesecond gain control position information are equal to each other isencoded, while if the result of the determination is negative, a flagindicating that the first gain control position information and thesecond gain control position information are not equal to each other andthe second gain control position information are encoded; the gaincontrol number is encoded; and gain control amount informationindicating a particular value corresponding to a gain control amount isencoded.

[0133] The present invention provides a twenty-third encoding apparatuscomprising detection means for detecting gain control positioninformation indicating a particular value corresponding to a gaincontrol position of a band signal; calculation means for calculating asmallest number of bits which can represent the difference between themaximum and minimum values of the gain control position informationdetected by the detection means; gain control position informationencoding means for encoding the gain control position information suchthat the minimum value determined by the calculation means is encoded, avalue obtained by subtracting the minimum value from the gain controlposition information detected by the detection means is expressed by asmany bits as the number of bits calculate by the calculation means, anda resultant expression is employed as the code of the gain controlposition information; gain control number encoding means for encoding again control number; and gain control amount information encoding meansfor encoding gain control amount information indicating a particularvalue corresponding to a gain control amount.

[0134] The calculation means may calculate a smallest number of bitswhich can represent the difference between the maximum and minimumvalues of one or more pieces of gain control position informationdetected by the detection means from one band signal; and the gaincontrol position information encoding means may encode the gain controlposition information such that values obtained by subtracting theminimum value from the one or more pieces of gain control positioninformation are expressed by as many bits as the number of bitscalculate by the calculation means and resultant expressions areemployed as the codes of the one or more pieces of gain control positioninformation.

[0135] The present invention provides a twenty-third encoding methodcomprising a detection step, of detecting gain control positioninformation indicating a particular value corresponding to a gaincontrol position of a band signal; a calculation step of calculating asmallest number of bits which can represent the difference between themaximum and minimum values of the gain control position informationdetected in the detection step; a gain control position informationencoding step for encoding the gain control position information suchthat the minimum value determined in the calculation step is encoded, avalue obtained by subtracting the minimum value from the gain controlposition information detected in the detection step is expressed by asmany bits as the number of bits calculated in the calculation step, anda resultant expression is employed as the code of the gain controlposition information; a gain control number encoding step of encoding again control number; and a gain control amount information encoding stepof encoding gain control amount information indicating a particularvalue corresponding to a gain control amount.

[0136] In the twenty-third encoding apparatus and encoding methodaccording to the present invention, gain control position informationindicating a particular value corresponding to a gain control positionof a band signal is detected; the smallest number of bits which canrepresent the difference between the maximum and minimum values of thedetected gain control position information is calculated; the determinedminimum value is encoded and furthermore gain control positioninformation is encoded such that values obtained by subtracting theminimum value from the detected pieces of gain control positioninformation are expressed by as many bits as the smallest number of bitscalculate above, and resultant expressions are employed as the codes ofthe respective pieces of gain control position information; the gaincontrol number is encoded; and gain control amount informationindicating a particular value corresponding to a gain control amount isencoded.

[0137] The present invention provides a twenty-fourth encoding apparatuscomprising detection means for detecting gain control positioninformation indicating a particular value corresponding to a gaincontrol position of an arbitrary band signal of a left-channel signaland that of a band signal of a right-channel signal in the same band asthat of the band signal of the left-channel signal; calculation meansfor calculating the difference value between the first gain controlposition information detected by the detection means from the bandsignal of the left-channel signal and the second gain control positioninformation detected by the detection means from the band signal of theright-channel signal; retaining means for retaining a table indicating avalue-code correspondence in which a code with a small number of bits isassigned to a value having a high probability of being obtained as theresult of the calculation of the difference value performed by thecalculation means; gain control position information encoding means forencoding the first or second gain control position information such thata code corresponding to the difference value calculated by thecalculation means is retrieved from the table and the retrieved code isemployed as the code of the first or. second gain control positioninformation; gain control number encoding means for encoding a gaincontrol number; and gain control amount information encoding means forencoding gain control amount information indicating a particular valuecorresponding to a gain control amount.

[0138] The table indicating the difference value versus codecorrespondence may include only one or more difference values havinghigh probabilities of being obtained as the result of the calculationperformed by the calculation means. In this case, when thecorrespondence of the calculated difference value is not found in thetable, the gain control position information encoding means may encodean escape code and the gain control position information.

[0139] The retaining means retaining means a first table indicating avalue-code correspondence which is applied when the first gain controlposition information indicates a position of an attack portion and inwhich a code with a small number of bits is assigned to a value having ahigh probability of being obtained as the result of the calculation ofthe difference value performed by the calculation means, and alsoretaining a second table indicating a value-code correspondence which isapplied when the first gain control position information indicates aposition of a release portion and in which a code with a small number ofbits is assigned to a value having a high probability of being obtainedas the result of the calculation of the difference value performed bythe calculation means; and the first encoding means performs encoding ofthe first gain control position information such that when the firstgain control position information corresponds to the position of anattack portion, a code corresponding to the difference value isretrieved from the first table and the retrieved code is employed as thecode of the first gain control position information, while when thefirst gain control position information corresponds to the position of arelease portion, a code corresponding to the difference value isretrieved from the second table and the retrieved code is employed asthe code of the first gain control position information.

[0140] The present invention provides a twenty-fourth encoding methodcomprising a detection step of detecting gain control positioninformation indicating a particular value corresponding to a gaincontrol position of an arbitrary band signal of a left-channel signaland that of a band signal of a right-channel signal in the same band asthat of the band signal of the left-channel signal; a calculation stepof calculating the difference value between first gain control positioninformation detected in the detection step from the band signal of theleft-channel signal and second gain control position informationdetected in the detection step from the band signal of the right-channelsignal; a retaining step of retaining a table indicating a value-codecorrespondence in which a code with a small number of bits is assignedto a value having a high probability of being obtained as the result ofthe calculation of the difference value performed in the calculationstep; a gain control position information encoding step of encoding thefirst or second gain control position information such that a codecorresponding to the difference value calculated in the calculation stepis retrieved from the table and the retrieved code is employed as thecode of the first or second gain control position information; a gaincontrol number encoding step of encoding a gain control number; and again control amount information encoding step of encoding gain controlamount information indicating a particular value corresponding to a gaincontrol amount.

[0141] In the twenty-fourth encoding apparatus and encoding methodaccording to the present invention, gain control position informationindicating a particular value corresponding to a gain control positionof an arbitrary band signal of a left-channel signal and that of a bandsignal of a right-channel signal in the same band as that of the bandsignal of the left-channel signal are detected; the difference valuebetween first gain control position information detected from the bandsignal of the left-channel signal and second gain control positioninformation detected from the band signal of the right-channel signal iscalculated; there is retained a table in which codes with small numbersof bits are assigned to values having high probabilities of beingobtained as the result of calculation of the difference value; a codecorresponding to the calculated difference value is retrieved from thetable and the retrieved code is employed as the code of the first orsecond gain control position information; the gain control number isencoded; and gain control amount information indicating a particularvalue corresponding to a gain control amount is encoded.

[0142] The present invention provides a twenty-fifth encoding apparatuscomprising detection means for detecting gain control positioninformation indicating a particular value corresponding to a gaincontrol position of an arbitrary band signal of a left-channel signaland that of a band signal of a right-channel signal in the same band asthat of the band signal of the left-channel signal; determination meansfor determining whether gain control position information detected bythe detection means from a band signal of the left-channel signal andgain control position information detected by the detection means from aband signal of the right-channel signal are equal to each other; gaincontrol position information encoding means for performing encoding suchthat if the determination made by the determination means isaffirmative, a flag indicating that the first gain control positioninformation and the second gain control position information are equalto each other and the first or second gain control position informationare encoded, while, if the determination made by the determination meansis negative, a flag indicating that the first gain control positioninformation and the second gain control position information are notequal to each other, the first gain control position information, andthe second and gain control position information are encoded; gaincontrol number encoding means for encoding a gain control number; andgain control amount information encoding means for encoding gain controlamount information indicating a particular value corresponding to a gaincontrol amount.

[0143] The present invention provides a twenty-fifth encoding methodcomprising a detection step of detecting gain control positioninformation indicating a particular value corresponding to a gaincontrol position of an arbitrary band signal of a left-channel signaland that of a band signal of a right-channel signal in the same band asthat of the band signal of the left-channel signal; a determination stepof determining whether the first gain control position informationdetected in the detection step from the band signal of the left-channelsignal is equal to the second gain control position information detectedin the detection step from the band signal of the right-channel signal;a gain control position information encoding step of performing encodingsuch that if the determination made in the determination step isaffirmative, a flag indicating that first gain control positioninformation and second gain control position information are equal toeach other and the first or second gain control position information areencoded, while, if the determination made in the determination step isnegative, a flag indicating that the first gain control positioninformation and the second gain control position information are notequal to each other, the first gain control position information, andthe second and gain control position information are encoded; a gaincontrol number encoding step of encoding a gain control number; and again control amount information encoding step of encoding gain controlamount information indicating a particular value corresponding to a gaincontrol amount.

[0144] In the twenty-fifth encoding apparatus and encoding methodaccording to the present invention, gain control position informationindicating a particular value corresponding to a gain control positionof an arbitrary band signal of a left-channel signal and that of a bandsignal of a right-channel signal in the same band as that of the bandsignal of the left-channel signal are detected; it is determined whethergain control position information detected from a band signal of theleft-channel signal and gain control position information detected bythe detection means from a band signal of the right-channel signal areequal to each other; if the result of the determination is affirmative,a flag indicating that the first gain control position information andthe second gain control position information are equal to each other andthe first or second gain control position information are encoded, whileif the result of the determination is negative, a flag indicating thatthe first gain control position information and the second gain controlposition information are not equal to each other and the first andsecond gain control position information are encoded; the gain controlnumber is encoded; and gain control amount information indicating aparticular value corresponding to a gain control amount is encoded.

[0145] The present invention provides a twenty-sixth encoding apparatuscomprising detection means for detecting gain control positioninformation indicating a particular value corresponding to a gaincontrol position of a band signal of a left-channel signal and that of aband signal of a right-channel signal; determination means fordetermining whether gain control position information detected by thedetection means from the band signals of the left-channel signal andgain control position information detected by the detection means fromthe corresponding band signals of the right-channel signal are equal toeach other for all bands; gain control position information encodingmeans for performing encoding such that if the determination made by thedetermination means is affirmative, the first or second gain controlposition information is encoded, while, if the determination made by thedetermination means is negative, the first gain control positioninformation and the second gain control position information areencoded; gain control number encoding means for encoding a gain controlnumber; and gain control amount information encoding means for encodinggain control amount information indicating a particular valuecorresponding to a gain control amount.

[0146] The present invention provides a twenty-sixth encoding methodcomprising a detection step for detecting gain control positioninformation indicating a particular value corresponding to a gaincontrol position of a band signal of a left-channel signal and that of aband signal of a right-channel signal; a determination step ofdetermining whether gain control position information detected in thedetection step from the band signal of the left-channel signal and gaincontrol position information detected in the detection step from theband signal of the right-channel signal are equal to each other for allbands; a gain control position information encoding step of performingencoding such that if the determination made in the determination stepis affirmative, the first or second gain control position information isencoded, while, if the determination made in the determination step isnegative, the first gain control position information and the secondgain control position information are encoded; a gain control numberencoding step of encoding a gain control number; and a gain controlamount information encoding step of encoding gain control amountinformation indicating a particular value corresponding to a gaincontrol amount.

[0147] In the twenty-sixth encoding apparatus and encoding methodaccording to the present invention, gain control position informationindicating a particular value corresponding to a gain control positionof a band signal of a left-channel signal and that of a band signal of aright-channel signal are detected; it is determined whether gain controlposition information detected from the band signals of the left-channelsignal and gain control position information detected from thecorresponding band signals of the right-channel signal are equal to eachother for all bands; if the result of the determination is affirmative,the first or second gain control position information is encoded, whileif the result of the determination is negative, the first gain controlposition information and the second gain control position informationare encoded; the gain control number is encoded; and gain control amountinformation indicating a particular value corresponding to a gaincontrol amount is encoded.

[0148] The present invention provides a twenty-seventh encodingapparatus comprising detection means for detecting gain control positioninformation indicating a particular value corresponding to a gaincontrol position of an arbitrary band signal of a left-channel signaland that of a band signal of a right-channel signal in the same band asthat of the band signal of the left-channel signal; first calculationmeans for calculating the difference value between first gain controlposition information and second gain control position information,wherein the first gain control position information is arbitrary gaincontrol position information of one or more pieces of gain controlposition information detected by the detection means from the bandsignal of the left-channel signal, and the second gain control positioninformation has a value corresponding to a gain control positionadjacent to the first gain control position; second calculation meansfor calculating the difference value between third gain control positioninformation and fourth gain control position information, wherein thethird gain control position information and fourth gain control positioninformation are gain control position information of one or more piecesof gain control position information detected from the band signal ofthe right-channel signal, and the third gain control positioninformation and fourth gain control position information correspond tothe first gain control position information and second gain controlposition information, respectively; third calculation means forcalculating the difference value between the difference value calculatedby the first calculation means and the difference value calculated bythe second calculation means; retaining means for retaining a tableindicating a value-code correspondence in which a code with a smallnumber of bits is assigned to a value having a high probability of beingobtained as the result of the calculation of the difference valueperformed by the third calculation means; gain control positioninformation encoding means for encoding the first gain control positioninformation such that a code corresponding to the difference valuecalculated by the third calculation means is retrieved from the tableand the retrieved code is employed as the code of the first gain controlposition information; gain control number encoding means for encoding again control number; and gain control amount information encoding meansfor encoding gain control amount information indicating a particularvalue corresponding to a gain control amount.

[0149] The table indicating the difference value versus codecorrespondence may include only one or more difference values havinghigh probabilities of being obtained as the result of the calculationperformed by the calculation means. In this case, when thecorrespondence of the calculated difference value is not found in thetable, the gain control position information encoding means may encodean escape code and the first gain control position information.

[0150] The retaining means retaining means a first table indicating avalue-code correspondence which is applied when the first gain controlposition information indicates a position of an attack portion and inwhich a code with a small number of bits is assigned to a value having ahigh probability of being obtained as the result of the calculation ofthe difference value performed by the second calculation means, and alsoretaining a second table indicating a value-code correspondence which isapplied when the first gain control position information indicates aposition of a release portion and in which a code with a small number ofbits is assigned to a value having a high probability of being obtainedas the result of the calculation of the difference value performed bythe second calculation means; and the first encoding means performsencoding of the first gain control position information such that whenthe first gain control position information corresponds to the positionof an attack portion, a code corresponding to the difference value isretrieved from the first table and the retrieved code is employed as thecode of the first gain control position information, while when thefirst gain control position information corresponds to the position of arelease portion, a code corresponding to the third difference value isretrieved from the second table and the retrieved code is employed asthe code of the first gain control position information.

[0151] The present invention provides a twenty-seventh encoding methodcomprising a detection step of detecting gain control positioninformation indicating a particular value corresponding to a gaincontrol position of an arbitrary band signal of a left-channel signaland that of a band signal of a right-channel signal in the same band asthat of the band signal of the left-channel signal; a first calculationstep of calculating the difference value between first gain controlposition information and second gain control position information,wherein the first gain control position information is arbitrary gaincontrol position information of one or more pieces of gain controlposition information detected in the detection step from the band signalof the left-channel signal, and the second gain control positioninformation has a value corresponding to a gain control positionadjacent to the first gain control position; a second calculation stepfor calculating the difference value between third gain control positioninformation and fourth gain control position information, wherein thethird gain control position information and fourth gain control positioninformation are gain control position information of one or more piecesof gain control position information detected from the band signal ofthe right-channel signal, and the third gain control positioninformation and fourth gain control position information correspond tothe first gain control position information and second gain controlposition information, respectively; a third calculation step ofcalculating the difference value between the difference value calculatedin the first calculation step and the difference value calculated in thesecond calculation step; a retaining step of retaining a tableindicating a value-code correspondence in which a code with a smallnumber of bits is assigned to a value having a high probability of beingobtained as the result of the calculation of the difference valueperformed in the third calculation step; a gain control positioninformation encoding step of encoding the first gain control positioninformation such that a code corresponding to the difference valuecalculated in the third calculation step is retrieved from the table andthe retrieved code is employed as the code of the first gain controlposition information; a gain control number encoding step of encoding again control number; and a gain control amount information encoding stepof encoding gain control amount information indicating a particularvalue corresponding to a gain control amount.

[0152] In the twenty-seventh encoding apparatus and encoding methodaccording to the present invention, gain control position informationindicating a particular value corresponding to a gain control positionof an arbitrary band signal of a left-channel signal and that of a bandsignal of a right-channel signal in the same band as that of the bandsignal of the left-channel signal are detected; the difference valuebetween first gain control position information and second gain controlposition information is calculated, wherein the first gain controlposition information is arbitrary gain control position information ofone or more pieces of gain control position information detected by thedetection means from the band signal of the left-channel signal, and thesecond gain control position information has a value corresponding to again control position adjacent to the first gain control position; andalso calculating the second difference value between third and fourthgain control position information of one or more pieces of gain controlposition information detected from the band signal of the right-channelsignal, the third gain control position information and the fourth gaincontrol position information corresponding to the first gain controlposition information and the second gain control position information,respectively; the difference value between the calculated differencevalues is further calculated; there is retained a table in which codeswith small numbers of bits are assigned to values having highprobabilities of being obtained as the result of calculation of thedifference value; a code corresponding to the calculated differencevalue is retrieved from the table and the retrieved code is employed asthe code of the first gain control position information; the gaincontrol number is encoded; and gain control amount informationindicating a particular value corresponding to a gain control amount isencoded.

[0153] The present invention provides a twenty-eighth encoding apparatuscomprising detection means for detecting gain control positioninformation indicating values corresponding to gain control positions ofan arbitrary first band signal, a second band signal, a third bandsignal, and a fourth band signal, respectively, the first band signaland the second band signal being of band signals of a left-channelsignal, the second band signal being of a band adjacent to a band of thefirst band signal, the third band signal and the fourth band signalbeing of band signals of a right-channel signal, the third band signalcorresponding to the first band signal, the fourth band signalcorresponding to the second band signal; first calculation means forcalculating the difference value between first gain control positioninformation detected by the detection means from the first band signaland second gain control position information detected by the detectionmeans from the second band signal; second calculation means forcalculating the difference value between third gain control positioninformation detected from the third band signal and fourth gain controlposition information detected from the fourth band signal; thirdcalculation means for calculating the difference value between thedifference value calculated by the first calculation means and thedifference value calculated by the second calculation means; retainingmeans for retaining a table indicating a value-code correspondence inwhich a code with a small number of bits is assigned to a value having ahigh probability of being obtained as the result of the calculation ofthe difference value performed by the third calculation means; gaincontrol position information encoding means for encoding the first gaincontrol position information such that a code corresponding to thedifference value calculated by the third calculation means is retrievedfrom the table and the retrieved code is employed as the code of thefirst gain control position information; gain control number encodingmeans for encoding a gain control number; and gain control amountinformation encoding means for encoding gain control amount informationindicating a particular value corresponding to a gain control amount.

[0154] The table indicating the difference value versus codecorrespondence may include only one or more difference values havinghigh probabilities of being obtained as the result of the calculationperformed by the third calculation means. In this case, when thecorrespondence of the calculated difference value is not found in thetable, the gain control position information encoding means may encodean escape code and the first gain control position information.

[0155] The retaining means retaining means a first table indicating avalue-code correspondence which is applied when the first gain controlposition information indicates a position of an attack portion and inwhich a code with a small number of bits is assigned to a value having ahigh probability of being obtained as the result of the calculation ofthe difference value performed by the third calculation means, and alsoretaining a second table indicating a value-code correspondence which isapplied when the first gain control position information indicates aposition of a release portion and in which a code with a small number ofbits is assigned to a value having a high probability of being obtainedas the result of the calculation of the difference value performed bythe third calculation means; and the first encoding means performsencoding of the first gain control position information such that whenthe first gain control position information corresponds to the positionof an attack portion, a code corresponding to the difference value isretrieved from the first table and the retrieved code is employed as thecode of the first gain control position information, while when thefirst gain control position information corresponds to the position of arelease portion, a code corresponding to the difference value isretrieved from the second table and the retrieved code is employed asthe code of the first gain control position information.

[0156] The present invention provides a twenty-eighth encoding methodcomprising a detection step for detecting gain control positioninformation indicating values corresponding to gain control positions ofan arbitrary first band signal, a second band signal, a third bandsignal, and a fourth band signal, respectively, the first band signaland the second band signal being of band signals of a left-channelsignal, the second band signal being of a band adjacent to a band of thefirst band signal, the third band signal and the fourth band signalbeing of band signals of a right-channel signal, the third band signalcorresponding to the first band signal, the fourth band signalcorresponding to the second band signal; a first calculation step ofcalculating the difference value between first gain control positioninformation detected in the detection step from the first band signaland second gain control position information detected in the detectionstep from the second band signal; a second calculation step forcalculating the difference value between third gain control positioninformation detected from the third band signal and fourth gain controlposition information detected from the fourth band signal; a thirdcalculation step of calculating the difference value between thedifference value calculated in the first calculation step and thedifference value calculated in the second calculation step; a retainingstep of retaining a table indicating a value-code correspondence inwhich a code with a small number of bits is assigned to a value having ahigh probability of being obtained as the result of the calculation ofthe difference value performed in the third calculation step; a gaincontrol position information encoding step of encoding the first gaincontrol position information such that a code corresponding to thedifference value calculated in the third calculation step is retrievedfrom the table and the retrieved code is employed as the code of thefirst gain control position information; a gain control number encodingstep of encoding a gain control number; and a gain control amountinformation encoding step of encoding gain control amount informationindicating a particular value corresponding to a gain control amount.

[0157] In the twenty-eighth encoding apparatus and encoding methodaccording to the present invention, gain control position informationindicating values corresponding to gain control positions of anarbitrary first band signal, a second band signal, a third band signal,and a fourth band signal, respectively, is detected, wherein the firstband signal and the second band signal are of band signals of aleft-channel signal, the second band signal is of a band adjacent to aband of the first band signal, the third band signal and the fourth bandsignal are of band signals of a right-channel signal, the third bandsignal corresponds to the first band signal, and the fourth band signalcorresponds to the second band signal; the difference value betweenfirst gain control position information detected from the first bandsignal and second gain control position information detected from thesecond band signal is calculated; the difference value between thirdgain control position information detected from the third band signaland fourth gain control position information detected from the fourthband signal is calculated; the difference value between the calculateddifference values is further calculated; there is retained a table inwhich codes with small numbers of bits are assigned to values havinghigh probabilities of being obtained as the result of calculation of thedifference value; a code corresponding to the calculated differencevalue is retrieved from the table and the retrieved code is employed asthe code of the first gain control position information; the gaincontrol number is encoded; and gain control amount informationindicating a particular value corresponding to a gain control amount isencoded.

[0158] The present invention provides a twenty-ninth encoding apparatuscomprising band splitting means for splitting the acoustic time seriessignal into N bands thereby producing N band signals; execution meansfor producing gain control numbers, gain control amount informationhaving values corresponding to the gain control amounts, and gaincontrol position information having values corresponding to gain controlpositions associated with the respective band signals and executing gaincontrol process on the band signals in accordance with the gain controlnumbers, the gain control amount information, and the gain controlposition information; a plurality of gain control number encoding meansfor encoding the gain control number; first selection means forselecting one of the gain control number encoding means, in accordancewith information indicating the code length of the gain control numbersencoded by the plurality of gain control number encoding means; aplurality of gain control amount information encoding means for encodingthe gain control amount information; second selection means forselecting one of the gain control amount information encoding means, inaccordance with information indicating the code length of the gaincontrol amount information encoded by the plurality of gain controlamount information encoding means; a plurality of gain control positioninformation encoding means for encoding the gain control positioninformation; third selection means for selecting one of the gain controlposition information encoding means, in accordance with informationindicating the code length of the gain control position informationencoded by the plurality of gain control position information encodingmeans; multiplexing means for multiplexing the gain control numbersencoded by the gain control number encoding means selected by the firstselection means, the gain control amount information encoded by the gaincontrol amount information encoding means selected by the secondselection means, and the gain control position information encoded bythe gain control position information encoding means selected by thethird selection means, together with the encoded acoustic time seriessignal, thereby producing encoded data.

[0159] The present invention provides a twenty-ninth encoding methodcomprising a band splitting step of splitting the acoustic time seriessignal into N bands thereby producing N band signals; an execution stepof producing gain control numbers, gain control amount informationhaving values corresponding to the gain control amounts, and gaincontrol position information having values corresponding to gain controlpositions associated with the respective band signals and executing gaincontrol process on the band signals in accordance with the gain controlnumbers, the gain control amount information, and the gain controlposition information; a gain control number encoding step of encodingthe gain control numbers; a first selection step of selecting one of thegain control number encoding step, in accordance with informationindicating the code length of the gain control numbers encoded in theplurality of gain control number encoding step; a plurality of gaincontrol amount information encoding steps for encoding the gain controlamount information; a second selection step of selecting one of the gaincontrol amount information encoding step, in accordance with informationindicating the code length of the gain control amount informationencoded in the plurality of gain control amount information encodingstep; a plurality of gain control position information encoding stepsfor encoding the gain control position information; a third selectionstep of selecting one of the gain control position information encodingstep, in accordance with information indicating the code length of thegain control position information encoded in the plurality of gaincontrol position information encoding step; a multiplexing step ofmultiplexing the gain control numbers encoded in the gain control numberencoding step selected in the first selection step, the gain controlamount information encoded in the gain control amount informationencoding steps selected in the second selection step, and the gaincontrol position information encoded in the gain control positioninformation encoding steps selected in the third selection step,together with the encoded acoustic time series signal, thereby producingencoded data.

[0160] In the twenty-ninth encoding apparatus and encoding methodaccording to the present invention, the acoustic time series signal issplit into N bands thereby producing N band signals; gain controlnumbers, gain control amount information having values corresponding tothe gain control amounts, and gain control position information havingvalues corresponding to gain control positions associated with therespective band signals are produced, and gain control process isexecuted on the band signals in accordance with the gain controlnumbers, the gain control amount information, and the gain controlposition information; the gain control numbers are encoded; one of thegain control number encoding methods is selected in accordance withinformation indicating the code length of the encoded gain controlnumbers; the gain control amount information is encoded; one of the gaincontrol amount information encoding methods is selected in accordancewith information indicating the code length of the encoded gain controlamount information; the gain control position information is encoded;one of the gain control position information encoding methods isselected in accordance with information indicating the code length ofthe encoded gain control position information; and the selected encodedgain control numbers, the selected encoded gain control amountinformation, and the selected encoded gain control position informationare encoded together with the encoded acoustic time series signalthereby producing encoded data.

BRIEF DESCRIPTION OF THE DRAWINGS

[0161]FIG. 1 is a block diagram showing an example of a construction ofan encoding apparatus 1 according to a conventional technique.

[0162]FIG. 2 is a diagram showing a format of encoding data.

[0163]FIG. 3 is a block diagram showing an example of a spectrumconverter 12 shown in FIG. 1.

[0164]FIG. 4A is a diagram showing a waveform signal in a block.

[0165]FIG. 4B is a diagram showing another waveform signal in a block.

[0166]FIG. 4C is a diagram showing another waveform signal in a block.

[0167]FIG. 4D is a diagram showing another waveform signal in a block.

[0168]FIG. 4E is a diagram showing another waveform signal in a block.

[0169]FIG. 5 is a block diagram showing an example of a construction ofa decoding apparatus 2 according to a conventional technique.

[0170]FIG. 6 is a block diagram showing an example of an inversespectrum converter 33 shown in FIG. 5.

[0171]FIG. 7 is a block diagram showing an example of a construction ofan encoding apparatus 51 according to the present invention.

[0172]FIG. 8 is a block diagram showing an example of a construction ofa gain control information encoder 61 shown in FIG. 7.

[0173]FIG. 9 is a block diagram showing an example of a construction ofa gain control number encoder 71 shown in FIG. 8.

[0174]FIG. 10 is a graph showing a characteristic of gain control numberGA.

[0175]FIG. 11 is a flow chart showing the operation of an encoder 81-1.

[0176]FIG. 12 shows a table in which a value-code correspondence and aprocedure of determining codes for particular values are represented.

[0177]FIG. 13 is a table showing an example of a set of gain controlnumber GA.

[0178]FIG. 14 is a diagram showing the procedure of determining codesshown in FIG. 12.

[0179]FIG. 15 is a graph showing a characteristic of a difference valueVA.

[0180]FIG. 16 is a flow chart showing the operation of an encoder 81-2.

[0181]FIG. 17 is a table showing another example of a set of gaincontrol number GA.

[0182]FIG. 18 shows another table in which a value-code correspondenceand a procedure of determining codes for particular values arerepresented.

[0183]FIG. 19 is a table showing another example of a set of gaincontrol number GA.

[0184]FIG. 20 is a flow chart showing the operation of an encoder 81-3.

[0185]FIG. 21 is a flow chart showing the operation of an encoder 81-4.

[0186]FIG. 22 is a table showing another example of a set of gaincontrol number GA.

[0187]FIG. 23 is a diagram showing an encoding method employed by theencoder 81-4.

[0188]FIG. 24 is a graph showing a characteristic of a difference valueWA1.

[0189]FIG. 25 is a diagram showing an encoding method employed by theencoder 81-5.

[0190]FIG. 26 is a table showing another example of a set of gaincontrol number GA.

[0191]FIG. 27 is a table showing another example of a set of gaincontrol number GA.

[0192]FIG. 28 is a flow chart showing the operation of an encoder 81-6.

[0193]FIG. 29 is a table showing another example of a set of gaincontrol number GA.

[0194]FIG. 30 is a flow chart showing the operation of an encoder 81-7.

[0195]FIG. 31 is a graph showing a characteristic of a difference valueWA2.

[0196]FIG. 32 is a flow chart showing the operation of an encoder 81-8.

[0197]FIG. 33 is a table showing another example of a set of gaincontrol number GA.

[0198]FIG. 34 shows another table in which a value-code correspondenceand a procedure of determining codes for particular values arerepresented.

[0199]FIG. 35 is a block diagram showing an example of a construction ofa gain control amount information encoder 72 shown in FIG. 8.

[0200]FIG. 36 is a graph showing a characteristic of gain control amountinformation GB.

[0201]FIG. 37 is a flow chart showing the operation of an encoder 91-1.

[0202]FIG. 38 shows another table in which a value-code correspondenceand a procedure of determining codes for particular values arerepresented.

[0203]FIG. 39 is a table showing an example of a set of gain controlamount information GB.

[0204]FIG. 40 is a table showing another example of a set of gaincontrol amount information GB.

[0205]FIG. 41 is a graph showing a characteristic of a difference valueVB1.

[0206]FIG. 42 is a flow chart showing the operation of an encoder 91-2.

[0207]FIG. 43 shows another table in which a value-code correspondenceand a procedure of determining codes for particular values arerepresented.

[0208]FIG. 44 is a graph showing a characteristic of a difference valueVB2.

[0209]FIG. 45 is a flow chart showing the operation of an encoder 91-3.

[0210]FIG. 46 is a table showing another example of a set of gaincontrol amount information GB.

[0211]FIG. 47 shows another table in which a value-code correspondenceand a procedure of determining codes for particular values arerepresented.

[0212]FIG. 48 is a graph showing a characteristic of a difference valueVB3.

[0213]FIG. 49 is a flow chart showing the operation of an encoder 91-4.

[0214]FIG. 50 is a table showing another example of a set of gaincontrol amount information GB.

[0215]FIG. 51 shows another table in which a value-code correspondenceand a procedure of determining codes for particular values arerepresented.

[0216]FIG. 52 is a table showing another example of a set of gaincontrol amount information GB.

[0217]FIG. 53 is a flow chart showing the operation of an encoder 91-5.

[0218]FIG. 54 is a table showing another example of a set of gaincontrol amount information GB.

[0219]FIG. 55 is a flow chart showing the operation of an encoder 91-6.

[0220]FIG. 56 is a flow chart showing the details of step S152 shown inFIG. 55.

[0221]FIG. 57 is a table showing another example of a set of gaincontrol amount information GB.

[0222]FIG. 58 is a flow chart showing the operation of an encoder 91-7.

[0223]FIG. 59 is a diagram showing an encoding method employed by theencoder 91-7.

[0224]FIG. 60 is a graph showing a characteristic of a difference valueWB1.

[0225]FIG. 61 is a flow chart showing the operation of an encoder 91-8.

[0226]FIG. 62 is a table showing another example of a set of gaincontrol amount information GB.

[0227]FIG. 63 shows another table in which a value-code correspondenceand a procedure of determining codes for particular values arerepresented.

[0228]FIG. 64 is a table showing another example of a set of gaincontrol amount information GB.

[0229]FIG. 65 is a flow chart showing the operation of an encoder 91-9.

[0230]FIG. 66 is a table showing another example of a set of gaincontrol amount information GB.

[0231]FIG. 67 is a flow chart showing the operation of an encoder 91-10.

[0232]FIG. 68 is a graph showing a characteristic of a difference valueWB2.

[0233]FIG. 69 is a flow chart showing the operation of an encoder 91-11.

[0234]FIG. 70 is a table showing another example of a set of gaincontrol amount information GB.

[0235]FIG. 71 shows another table in which a value-code correspondenceand a procedure of determining codes for particular values arerepresented.

[0236]FIG. 72 is a graph showing a characteristic of a difference valueWB3.

[0237]FIG. 73 is a flow chart showing the operation of an encoder 91-12.

[0238]FIG. 74 is a table showing another example of a set of gaincontrol amount information GB.

[0239]FIG. 75 shows another table in which a value-code correspondenceand a procedure of determining codes for particular values arerepresented.

[0240]FIG. 76 is a block diagram showing an example of a construction ofa gain control position information encoder 73 shown in FIG. 8.

[0241]FIG. 77 is a flow chart showing the operation of an encoder 101-1.

[0242]FIG. 78 is a flow chart showing the details of step S233 shown inFIG. 77.

[0243]FIG. 79 is a table showing an example of a set of gain controlposition information GC.

[0244]FIG. 80 is a graph showing a characteristic of gain controlposition information GC.

[0245]FIG. 81 is a flow chart showing the operation of an encoder 101-2.

[0246]FIG. 82 is a flow chart showing the details of step S262 shown inFIG. 81.

[0247]FIG. 83 shows another table in which a value-code correspondenceand a procedure of determining codes for particular values arerepresented.

[0248]FIG. 84 is a table showing another example of a set of gaincontrol position information GC.

[0249]FIG. 85 is a graph showing a characteristic of a difference valueVC1.

[0250]FIG. 86 is a flow chart showing the operation of an encoder 101-3.

[0251]FIG. 87 is a table showing another example of a set of gaincontrol position information GC.

[0252]FIG. 88 shows another table in which a value-code correspondenceand a procedure of determining codes for particular values arerepresented.

[0253]FIG. 89 shows another table in which a value-code correspondenceand a procedure of determining codes for particular values arerepresented.

[0254]FIG. 90 is a graph showing a characteristic of a difference valueVC2.

[0255]FIG. 91 is a flow chart showing the operation of an encoder 101-4.

[0256]FIG. 92 is a table showing another example of a set of gaincontrol position information GC.

[0257]FIG. 93 shows another table in which a value-code correspondenceand a procedure of determining codes for particular values arerepresented.

[0258]FIG. 94 shows another table in which a value-code correspondenceand a procedure of determining codes for particular values arerepresented.

[0259]FIG. 95 is a graph showing a characteristic of a difference valueVC3.

[0260]FIG. 96 is a flow chart showing the operation of an encoder 101-5.

[0261]FIG. 97 is a table showing another example of a set of gaincontrol position information GC.

[0262]FIG. 98 shows another table in which a value-code correspondenceand a procedure of determining codes for particular values arerepresented.

[0263]FIG. 99 shows another table in which a value-code correspondenceand a procedure of determining codes for particular values arerepresented.

[0264]FIG. 100 is a table showing another example of a set of gaincontrol position information GC.

[0265]FIG. 101 is a flow chart showing the operation of an encoder101-6.

[0266]FIG. 102 is a table showing another example of a set of gaincontrol position information GC.

[0267]FIG. 103 is a flow chart showing the operation of an encoder101-7.

[0268]FIG. 104 is a flow chart showing the details of step S322 shown inFIG. 103.

[0269]FIG. 105 is a table showing another example of a set of gaincontrol position information GC.

[0270]FIG. 106 is a flow chart showing the operation of an encoder101-8.

[0271]FIG. 107 is a diagram showing an encoding method employed by theencoder 101-8.

[0272]FIG. 108 is a graph showing a characteristic of a difference valueWC1.

[0273]FIG. 109 is a flow chart showing the operation of an encoder101-9.

[0274]FIG. 110 is a table showing another example of a set of gaincontrol position information GC.

[0275]FIG. 111 shows another table in which a value-code correspondenceand a procedure of determining codes for particular values arerepresented.

[0276]FIG. 112 shows another table in which a value-code correspondenceand a procedure of determining codes for particular values arerepresented.

[0277]FIG. 113 is a table showing another example of a set of gaincontrol position information GC.

[0278]FIG. 114 is a flow chart showing the operation of an encoder101-10.

[0279]FIG. 115 is a table showing another example of a set of gaincontrol position information GC.

[0280]FIG. 116 is a flow chart showing the operation of an encoder101-11.

[0281]FIG. 117 is a graph showing a characteristic of a difference valueWC2.

[0282]FIG. 118 is a flow chart showing the operation of an encoder101-12.

[0283]FIG. 119 is a table showing another example of a set of gaincontrol position information GC.

[0284]FIG. 120 shows another table in which a value-code correspondenceand a procedure of determining codes for particular values arerepresented.

[0285]FIG. 121 shows another table in which a value-code correspondenceand a procedure of determining codes for particular values arerepresented.

[0286]FIG. 122 is a graph showing a characteristic of a difference valueWC3.

[0287]FIG. 123 is a flow chart showing the operation of an encoder101-13.

[0288]FIG. 124 is a table showing another example of a set of gaincontrol position information GC.

[0289]FIG. 125 shows another table in which a value-code correspondenceand a procedure of determining codes for particular values arerepresented.

[0290]FIG. 126 shows another table in which a value-code correspondenceand a procedure of determining codes for particular values arerepresented.

[0291]FIG. 127 is a block diagram showing an example of a constructionof a decoding apparatus 151 according to the present invention.

[0292]FIG. 128 is a block diagram showing an example of a constructionof a gain control information decoder 161 shown in FIG. 127.

[0293]FIG. 129 is a block diagram showing an example of a constructionof a gain control number decoder 171 shown in FIG. 128.

[0294]FIG. 130 is a block diagram showing an example of a constructionof a gain control amount information decoder 172 shown in FIG. 128.

[0295]FIG. 131 is a block diagram showing an example of a constructionof a gain control position information decoder 173 shown in FIG. 128.

[0296]FIG. 132 is a block diagram showing another example of aconstruction of the encoding apparatus 51.

[0297]FIG. 133 is a block diagram showing another example of aconstruction of the decoding apparatus 151.

[0298]FIG. 134 is a block diagram showing an example of a constructionof a computer 501.

BEST MODE FOR CARRYING OUT THE INVENTION

[0299]FIG. 7 shows an example of a construction of an encoding apparatus51 according to the present invention. In addition to the parts employedin the encoding apparatus 1 shown in FIG. 1, the encoding apparatus 51further includes gain control information encoder 61. The other partsare similar to those of the encoding apparatus 1 shown in FIG. 1 andthus they are not described in further detail herein.

[0300] The spectrum converters 12-1 to 12-12 cut encoding units A0 toA11 input from a band splitter 11 into blocks (frames) with a fixedlength (time period) and generate gain control information G0 to G11depending on the amplitudes of the waveform signals in each block.Furthermore, the spectrum converters 12-1 to 12-12 control the gains ofthe waveform signals in the block in accordance with the gain controlinformation G0 to G11. The spectrum converters 12-1 to 12-12 outputproduced gain control information G0 to G11 to the gain controlinformation encoder 61.

[0301] The spectrum converters 12-1 to 12-12 perform a spectrumconversion based on DFT, DCT, or MDCT, on the signals subjected to thegain control, thereby generating spectral component signals S0 to S11.The resultant spectral component signals S0 to S11 are supplied tonormalizers 13-1 to 13-12.

[0302]FIG. 8 shows a construction of the gain control informationencoder 61. The gain control information G0 to G11 output from thespectrum converters 12-1 to 12-12 are input to a gain control numberencoder 71, a gain control amount information encoder 72, and a gaincontrol position information encoder 73.

[0303] The gain control number encoder 71 encodes gain control numbersGA0 to GA11 included in the input gain control information G0 to G11, bymeans of various different encoding methods which will be descried indetail later. The gain control number encoder 71 selects encoded gaincontrol numbers GA0 to GA11 having a smallest total number of bits amongthose encoded by the various different encoding methods and output theselected encoded gain control numbers GA0 to GA11 to a multiplexer 16.

[0304] The gain control amount information encoder 72 encodes gaincontrol amount information GB0 to GB11 included in the input gaincontrol information G0 to G11, by means of various different encodingmethods which will be descried later. The gain control amountinformation encoder 72 selects encoded gain control amount informationGB0 to GB11 having a smallest total number of bits among those encodedby the various different encoding methods and output the selectedencoded gain control amount information GB0 to GB11 to the multiplexer16.

[0305] The gain control position information encoder 73 encodes gaincontrol position information GC0 to GC11 included in the input gaincontrol information G0 to G11, by means of various different encodingmethods which will be descried later. The gain control positioninformation encoder 73 selects encoded gain control position informationGC0 to GC11 having a smallest total number of bits among those encodedby the various different encoding methods and output the selectedencoded gain control position information GC0 to GC11, to themultiplexer 16.

[0306] Referring again to FIG. 7, the multiplexer 16 encodes thenormalized coefficients B0 to B11 received from the normalizer 13, thequantization step size information D0 to D11 received from thequantization step size setting unit 14, and the quantized coefficientsF0 to F11 received from the quantizer 5 and multiplexes them togetherwith the encoded gain control information G0 to G11 (the gain controlnumbers GA0 to GA11, the gain control amount information GB0 to GB11,and the gain control position information GC0 to GC11) received from thegain control information encoder 61, on a frame-by-frame basis.

[0307] That is, in the present invention, the gain control numbers GA,the gain control amount information GB and the gain control positioninformation GC of the gain control information G are respectivelyencoded into codes with smallest number of bits of those obtained byvarious encoding methods. That is, the gain control information G isencoded into a variable-length code so that the quantized coefficients Fcan be encoded more efficiently than can be by the conventionalfixed-bit encoding method.

[0308] The gain control number encoder 71, the gain control amountinformation encoder 72, and the gain control position informationencoder 73 (FIG. 8) of the gain control information encoder 61 aredescribed in further detail below.

[0309] First, the details of the gain control number encoder 71 aredescribed. FIG. 9 shows an example of a construction of the gain controlnumber encoder 71.

[0310] The gain control information G0 to G11 output from the spectrumconverters 12-1 to 12-12 are input to each of eight encoders 81-1 to81-8.

[0311] The encoders 81-1 to 81-8 detect gain control numbers GA0 to GA11from the respective input gain control information G0 to G11 and encodethe detected gain control numbers GA0 to GA11 by means of predeterminedencoding methods. Resultant encoded data are output to terminalsconnected to switch 83.

[0312] Each of the encoders 81-1 to 81-8 calculates the sum of thenumbers of bits of the encoded gain control numbers GA0 to GA11 andoutputs the calculated sum to the decision unit 82.

[0313] The decision unit 82 detects, among encoders 81-1 to 81-8, anencoder 81 which has output a smallest sum, that is, the decision unit82 detects an encoder 81 which has encoded the gain control numbers GA0to GA11 into a smallest total number of bits, and the decision unit 82controls the switch 83 so that the encoded gain control numbers GA0 toGA11 encoded by the detected encoder 81 are output to the multiplexer16. The decision unit 82 also outputs information indicating theencoding method employed by the detected encoder 81 to the multiplexer16. The decision unit 82 stores information indicating the encodingmethods employed by the respective encoders 81.

[0314] The encoding methods employed by the respective encoders 81-1 to81-8 of the gain control number encoder 71 are described.

[0315] First, the encoding method employed by the encoder 811 isdescribed.

[0316] Although the gain control number GA can take any one of valuesfrom, in this specific example, 0 to 7, the gain control number GA has ahigh probability of taking a particular number (for example, 0) as shownin FIG. 10. Thus, in the encoding of the gain control numbers GA, theencoder 81-1 assigns a code with a small number of bits to a gaincontrol number GA having a high occurrence probability.

[0317] The operation of the encoder 81-1 is described below withreference to a flow chart shown in FIG. 11.

[0318] In step S11, the encoder 81-1 detects gain control numbers GAi(i=0, 1, 2, . . . . , 11) of one frequency band from the input gaincontrol information G0 to G11.

[0319] In the next step S12, the encoder 81-1 determines a code to beassigned to the gain control number GAi. More specifically, the encoder81-1 retrieves a code corresponding to the gain control number GAidetected in step S11 from a table shown in FIG. 12 and employs theretrieved code as the code of the gain control number GAi.

[0320] For example, in the case of gain control number GA2 of gaincontrol numbers GA0 to GA11 shown in FIG. 13, the gain control numberGA2 has a value of 1 and thus a 2-bit code of “10” is employed as thecode thereof.

[0321] In the table shown in FIG. 12, a 1-bit code “0” is assigned to avalue 0, a 2-bit code “10” to a value 1, a 3 bit code “110” to a value2, and a 4-bit code “1110” to a value 3. Thus, if the encoder 81-1detects a gain control number GAi having a value in the range of 0 to 3,the encoder 81-1 selects “0”, “110”, “110”, or “1110” corresponding tothe value of the gain control number GAi and employs it as the code ofthe gain control number GAi.

[0322] Furthermore, in the table shown in FIG. 12, a procedure ofdetermining a code for a value in the range from 4 to 7 is defined (morespecifically, the code is determined by a formula 1111+(gain controlnumber−4)).

[0323] According to this procedure, a 6-bit code consisting of bits b0to b5 is given, as shown in FIG. 14, by a combination of a 4-bit code“1111” (escape code) and a following 2-bit code having a value equal tothe gain control number GAi (having a value in the range from 4 to 7)minus 4. That is, if the encoder 81-1 detects a gain control number GAihaving a value in the range of 4 to 7, the encoder 81-1 determines a6-bit code via the above-described procedure and employs it as the codefor the gain control number GAi.

[0324] In the next step S13, the encoder 81-1 determines whether codeshave been determined for all gain control numbers GA0 to GA11, that is,whether all gain control numbers GA0 to GA11 have been encoded. If it isdetermined that all gain control numbers GAi have not been encoded, theprocess returns to step S11 to perform the step S11 and following stepsto encode a next unencoded gain control number GAi.

[0325] If it is determined in step S13 that all gain control numbers GA0to GA11 have been encoded, the process proceeds to step S14. In stepS14, the encoder 81-1 outputs the codes determined in step S12 for therespective gain control numbers GA0 to GA11 to the terminal connected tothe switch 83.

[0326] In the next step S15, the encoder 81-1 calculates the sum of thenumbers of bits of the encoded gain control numbers GA0 to GA11 andoutputs the calculated sum to the decision unit 82.

[0327] For example, in the case of the gain control numbers GA0 to GA11shown in FIG. 13, codes with numbers of bits such as those shown in FIG.13 are produced as the result of the encoding, and thus the total numberof bits of the codes becomes equal to 26. Thus, a signal indicating thatthe total number of bits is equal to 26 is supplied to the decision unit82.

[0328] If the conventional fixed-length (3-bit) encoding method wereemployed, the gain control numbers GA in the example shown in FIG. 13would be encoded into codes with a total of 36 (=3×6) bits. Thus, thetotal number of bits of encoded data according to the present inventionis smaller by 10 than that according to the conventional technique.

[0329] As described above, assigning a code with a small number of bits(1-bit code “0”) to a gain control number GA having a high occurrenceprobability makes it possible to reduce the total number of bits of gaincontrol numbers GA0 to GA11.

[0330] Although in the table (FIG. 12) used in the present example,escape codes are used for some values, specific codes including noescape code may be assigned to all respective values.

[0331] In the present example, the gain control number GA is assumed tohave such a characteristic shown in FIG. 10. In a case in which thecharacteristic of the gain control number GA varies from one encodingunit Ai to another, the coding table may be switched depending on thecharacteristic of the gain control number GA.

[0332] Now, the encoding method employed by the encoder 81-2 isdescribed.

[0333] In most cases, the gain control numbers GA of encoding units A inadjacent two frequency bands (the gain control number GAi-1 of theencoding unit Ai-1 and the gain control number GAi of the encoding unitAi) are equal or close to each other. For example, the absolute value ofthe difference value VA obtained by subtracting the gain control numberGAi-1 from the gain control number GAi has a high probability ofbecoming equal or close to 0, as shown in FIG. 15.

[0334] In view of the above, the encoder 81-2 encodes the gain controlnumber GA in such a manner that codes with small numbers of bits areassigned to difference values VA having high occurrence probabilities.

[0335] The operation of the encoder 81-2 is described below withreference to a flow chart shown in FIG. 16.

[0336] In step S21, the encoder 81-2 detects a gain control number GAiof one frequency band from the input gain control information G0 to G11and determines the difference value VA by subtracting, from the gaincontrol number GAi, the gain control number GAi-1 of the encoding unitAi-1 which is in a lower frequency band adjacent to the frequency bandof the encoding unit Ai and which was detected in previous execution ofstep 21.

[0337] Hereinafter, for simplicity, the difference value VA obtained bysubtracting the gain control number GAi-1 from the gain control numberGAi will be referred to simply as the difference value VA of the gaincontrol number GAi.

[0338] For example, in the case of gain control numbers GA0 to GA11shown in FIG. 17, the difference value VA of the gain control number GA1(=2) is calculated as 1 (=gain control number GA1 (=2)−gain controlnumber GA0 (=1)).

[0339] Note that the difference value VA of the gain control number GA0is not calculated because there is no gain control number GA in a bandlower than the band of the gain control number GA0.

[0340] In the next step S22, the encoder 81-2 retrieves a codecorresponding to a value equal to the difference value VA calculated instep S21 from a table shown in FIG. 18 and employs the retrieved code asthe code of the gain control number GAi.

[0341] In the table shown in FIG. 18, a 5-bit code “11110” is assignedto a value −2, a 3-bit code “110” to a value −1, a 1-bit code “0” to avalue 0, a 2-bit code “10” to a value 1, and a 4-bit code “1110” to avalue 2.

[0342] Furthermore, in the table shown in FIG. 18, a procedure ofdetermining a code for a value other than the values of −2 to 2 is alsodefined (more specifically, the code is given by a formula11111+original value). According to this procedure, an 8-bit code isgiven by a combination of a 5-bit code “11111” and a following 3-bitcode having a value equal to the gain control number GA (originalvalue).

[0343] In the case of the gain control number GA0, a code correspondingto a value equal to the value of the gain control number GA0 isretrieved from the table shown in FIG. 12, and the retrieved code isemployed as the code of the gain control number GA0. For example, thegain control number GA0 shown in FIG. 17 has a value of 1, and thus a 2bit code of 111011 is employed as the code thereof.

[0344] In the next step S23, the encoder 81-2 determines whether codeshave been determined for all gain control numbers GA0 to GA11, that is,whether all gain control numbers GA0 to GA11 have been encoded. If it isdetermined that all gain control numbers GAi have not been encoded, theprocess returns to step S21 to perform the step S21 and following stepsto encode a next unencoded gain control number GAi.

[0345] If it is determined in step S23 that all gain control numbers GA0to GA11 have been encoded, the process proceeds to step S24. In stepS24, the encoder 81-2 outputs the codes determined in step S22 for therespective gain control numbers GA0 to GA11 to the terminal connected tothe switch 83.

[0346] In the next step S25, the encoder 81-2 calculates the sum of thenumbers of bits of the encoded gain control numbers GA0 to GA11 andoutputs the calculated sum to the decision unit 82.

[0347] For example, in the case of gain control numbers GA shown in FIG.17, codes with numbers of bits such as those shown in FIG. 17 areproduced as the result of the encoding, and thus the total number ofbits of the codes becomes equal to 16. Thus, a signal indicating thatthe total number of bits is equal to 16 is supplied to the decision unit82.

[0348] If the conventional fixed-length (3-bit) encoding method wereemployed, the gain control numbers GA in the example shown in FIG. 17would be encoded into codes with a total of 36 (=3×12) bits. Thus, thetotal number of bits of encoded data according to the present inventionis smaller by 20 than that according to the conventional technique.

[0349] Now, the encoding method employed by the encoder 81-3 isdescribed.

[0350] In some cases, a gain control number GAi has a value equal to thevalue of a gain control number GAi-1 of a lower frequency bandimmediately adjacent to the ban of the gain control number GAi. Forexample, in the gain control numbers GA0 to GA11 shown in FIG. 19, again control number GA3 (=1) is equal in value to a gain control numberGA2 (=1).

[0351] Thus, when a gain control number GAi-1 and a gain control numberGAi are equal in value to each other, the encoder 81-3 encodes the gaincontrol number GA in such a manner that only a flag (encoding flag) setto a value (0, in this specific example) indicating that the gaincontrol number GAi-1 and the gain control number GAi are equal in valueto each other is encoded.

[0352] The operation of the encoder 81-3 is described below withreference to a flow chart shown in FIG. 20.

[0353] In step S31, the encoder 81-3 detects a gain control number GAiof one frequency band from the input gain control information GA0 toGA11, and determines whether the detected gain control number GAi isequal to the gain control number GAi-1 detected in previous execution ofstep S31. If it is determined that they are equal to each other, theprocess proceeds to step S32 to set the encoding flag of the gaincontrol number GAi to 0.

[0354] In the specific example shown in FIG. 19, the gain control numberGA3 (=1) is equal in value to the gain control number GA2 (=1), and thusthe encoding flag associated with the gain control number GA3 is set to0.

[0355] In a case in which it is determined in step S31 that the gaincontrol number GAi is not equal to the gain control number GAi-1, theprocess proceeds to step S33. In step S33, the encoder 81-3 sets theencoding flag associated with the gain control number GAi to 1. In stepS34, the encoder 81-3 expresses the gain control number GAi using afixed number of bits (3 bits) and employs the resultant fixed-lengthexpression as the code of the gain control number GAi.

[0356] In the example shown in FIG. 19, a gain control number GA0 (=1)and a gain control number GA1 (=4) are not equal in value to each other,and thus the encoding flag associated with the gain control number GA1is set to 1, and a 3-bit code representing the value of the gain controlnumber GA1, that is, 4, is assigned to the gain control number GA1.

[0357] In this example, there is no encoding flag associated with thegain control number GA0, and the code for the gain control number GA0 isdetermined in step S34 as with a gain control number GA corresponding toan encoding flag set to 1.

[0358] After step S32 in which the encoding flag is set to 0, or afterstep S34 in which the gain control number GAi is encoded into a 3-bitcode, the process proceeds to step S35. In step S35, the encoder 81-3determines whether all encoding flags have been set to 0 or 1 and allgain control numbers GAi corresponding to the encoding flags set to 1have been encoded into 3-bit codes, that is, the encoder 813 determineswhether all gain control numbers GA0 to GA11 have been encoded. If it isdetermined that all gain control numbers GAi have not been encoded, theprocess returns to step S31 to perform the step S31 and following stepsto encode a next unencoded gain control number GAi.

[0359] If it is determined in step S35 that all gain control numbers GA0to GA11 have been encoded, the process proceeds to step S36. In stepS36, the encoder 81-3 outputs the encoding flag set to 0 or 1 and thecodes to the terminal connected to the switch 83.

[0360] In the next step S37, the encoder 81-3 calculates the sum of thenumbers of bits of the encoded gain control numbers GA0 to GA11 andoutputs the calculated sum to the decision unit 82.

[0361] In the example shown in FIG. 19, as a result of encoding of thegain control numbers GA, 11 1-bit encoding flags, a 3-bit codeassociated with the gain control number GA0, a 3-bit code associatedwith the gain control number GA1, and a 3-bit code associated with thegain control number GA2 are generated, and thus a signal indicating thatthe total number of bits is equal to 20 is output to the decision unit82.

[0362] If the conventional fixed-length (3-bit) encoding method wereemployed, the gain control numbers GA in the example shown in FIG. 19would be encoded into codes with a total of 36 (=3×12) bits. Thus, thetotal number of bits of encoded data according to the present inventionis smaller by 16 than that according to the conventional technique.

[0363] Although in the present embodiment, the gain control number GA0,and also the gain control number GAi if it is not equal in value to thegain control number GAi-1, are encoded into codes with the fixed bitlength, the encoding may be performed according to another method.

[0364] Now, the encoding method employed by the encoder 81-4 isdescribed.

[0365] In most cases, because the gain control numbers GA0 to GA11 areclose in value to each other, subtracting the minimum value of the gaincontrol numbers GA0 to GA11 from the respective values of the gaincontrol numbers GA0 to GA11 results in small values which can berepresented using a small number of bits.

[0366] In view of the above, the encoder 81-4 encodes each gain controlnumber GA in such a manner that the minimum value of the gain controlnumbers GA0 to GA11 is subtracted from the gain control number GAi andthe resultant value represented in a predetermined number of bits isemployed as the code of the gain control number GAi.

[0367] The operation of the encoder 81-4 is described below withreference to a flow chart shown in FIG. 21.

[0368] In step S41, the encoder 81-4 extracts gain control numbers GA0to GA11 from the input gain control information G0 to G11 and detectsmaximum and minimum values of the extracted gain control numbers GA0 toGA11. In the example shown in FIG. 22, the maximum value of the gaincontrol numbers GA0 to GA11 is detected as 2 and the minimum value as 1.

[0369] In step S42, the encoder 81-4 calculates the difference betweenthe maximum and minimum values detected in step S41, and determines thenumber of bits which can represent the difference. Hereinafter, such anumber of bits will be referred to as a necessary number of bits. In theexample shown in FIG. 22, the difference between the maximum value (2)and the minimum value (1) is equal to 1, and thus the necessary numberof bits is 1.

[0370] In step S43, the encoder 81-4 subtracts the minimum valuedetected in step S41 from the respective values of the gain controlnumbers GA0 to GA11 and expresses the resultant difference values usingas many bits as the necessary number of bits calculated in sep S42. Theresultant expressions are employed as codes for the respective gaincontrol numbers GA0 to GA11. In the present example, the differencebetween the maximum and minimum values is equal to 1, and thus it can berepresented by 1 bit (and thus the necessary number of bits is 1).Therefore, the values obtained by extracting the minimum value from therespective gain control numbers GA can be represented by 1 bit (equal tothe necessary number of bits).

[0371] In step S44, the data indicating the minimum value detected instep S41, the data indicating the necessary number of bits calculated instep S42, and the codes, expressed using as many bits as the necessarynumber of bits, of gain control numbers GA0 to GA11 determined in stepS43 are output from the encoder 81-4 to the terminal connected theswitch 83.

[0372] In the example shown in FIG. 22, 3-bit data indicating theminimum value (=1), 2-bit data indicating the necessary number of bits(1 bit), and 12 codes represented in 1 bit (equal to the necessarynumber of bits) are output, as shown in FIG. 23.

[0373] In the next step S45, the encoder 81-4 calculates the sum of thenumbers of bits of the encoded gain control numbers GA0 to GA11 andoutputs the calculated sum to the decision unit 82.

[0374] For example, in the case of gain control numbers GA shown in FIG.22, 2-bit data indicating the necessary number of bits, 3-bit dataindicating the minimum value, and 12 1 bit (necessary number of bits)codes are generated as the result of the encoding, and thus a signalindicating that the total number of bits is equal to 17 is supplied tothe decision unit 82.

[0375] If the conventional fixed-length (3-bit) encoding method wereemployed, the gain control numbers GAR in the example shown in FIG. 22would be encoded into codes with a total of 36 (=3×12) bits. Thus, thetotal number of bits of encoded data according to the present inventionis smaller by 19 than that according to the conventional technique.

[0376] The encoding method employed by the encoder 81-5 is described.

[0377] In most cases, in the stereo audio signal, the gain controlnumber GALi of the left-channel signal and the gain control number GARiof the right-channel signal in the same frequency band are equal orclose to each other. Therefore, the absolute value of the differencevalue WA1 obtained by subtracting the gain control number GALi from thegain control number GARi has a high probability of becoming equal orclose to 0, as shown in FIG. 24.

[0378] In view of the above, the encoder 81-5 encodes the gain controlnumber GAL or GAR in such a manner that codes with small numbers of bitsare assigned to difference values WA1 having high occurrenceprobabilities. That is, either the gain control number GAL or the gaincontrol number GAR is encoded by means of the above method, and theother is encoded by means of, for example, the conventional encodingmethod.

[0379] The operation of the encoder 81-5 is described below withreference to a flow chart shown in FIG. 25. Herein, it is assumed thatthe encoder 81-5 encodes the gain control number GAR.

[0380] In step S51, the encoder 81-5 detects a gain control number GALiand a gain control number GARi of one frequency band from the input gaincontrol information GL0 to GL11 of the left-channel signal and gaincontrol information GR0 to GR11 of the right-channel signal,respectively, and calculates the difference value WA1 by subtracting thegain control number GALi from the gain control number GARi.

[0381] Hereinafter, for simplicity, the difference value WA1 obtained bysubtracting the gain control number GALi from the gain control numberGARi will be referred to simply as the difference value WA1 of the gaincontrol number GARi.

[0382] For example, in the case of the gain control numbers GAR0 toGAR11 shown in FIG. 26, the difference value WA1 of the gain controlnumber GAR0 is calculated as −1 (=gain control number GAR0 (=1)−gaincontrol number GAL0 (=2)).

[0383] In the next step S52, the encoder 81-5 retrieves a codecorresponding to the difference value WA1 calculated in step S51 from atable similar to that shown in FIG. 18 and employs the retrieved code asthe code of the gain control number GARi.

[0384] For example, in the case of the gain control number GAR0, becausethe difference value WA1 thereof is −1, and thus a 3-bit code “110” isemployed as the code for the gain control number GAR0.

[0385] In step S53, the encoder 81-5 determines whether codes have beendetermined for all gain control numbers GAR0 to GAR11, that is, whetherall gain control numbers GAR0 to GAR11 have been encoded. If it isdetermined that all gain control numbers GAi have not been encoded, theprocess returns to step S51 to perform the step S51 and following stepsto encode a next unencoded gain control number GARi.

[0386] If it is determined in step S53 that all gain control numbersGAR0 to GAR11 have been encoded, the process proceeds to step S54. Instep S54, the encoder 81-5 outputs the codes determined in step S52 forthe respective gain control numbers GAR0 to GAR11 to the terminalconnected to the switch 83.

[0387] In the next step S55, the encoder 81-5 calculates the sum of thenumbers of bits of the gain control numbers GAR0 to GAR11 and outputsthe calculated sum to the decision unit 82.

[0388] For example, the gain control numbers GAR shown in FIG. 26 areencoded into codes with as many bits as shown in FIG. 26, and thus thetotal number of bits of the codes becomes equal to 14. Thus, a signalindicating that the total number of bits is equal to 14 is supplied tothe decision unit 82.

[0389] If the conventional fixed-length (3-bit) encoding method wereemployed, the gain control numbers GAL in the example shown in FIG. 26would be encoded into codes with a total of 36 (=3×12) bits. Thus, thetotal number of bits of encoded data according to the present inventionis smaller by 22 than that according to the conventional technique.

[0390] In the encoding table (FIG. 18) employed in the present example,some values are encoded using escape codes. Alternatively, specificcodes corresponding to respective values may be defined in the table forall values.

[0391] In the present example, the difference value WA1 is assumed tohave such a characteristic shown in FIG. 24. In a case in which thecharacteristic of the difference value WA1 varies from one encoding unitAi to another, the coding table may be switched depending on thecharacteristic of the difference value WA1.

[0392] Now, the encoding method employed by the encoder 81-6 isdescribed.

[0393] In the stereo audio signal, the gain control number GALi of theleft-channel signal and the gain control number GARi of theright-channel signal in the same frequency band often become equal toeach other. For example, in FIG. 27, a gain control number GAL2 (=1) ofthe gain control numbers GAL0 to GAL11 is equal in value to a gaincontrol number GAR2 (=1) of the gain control numbers GAR0 to GAR11.

[0394] In view of the above, the encoder 81-6 performs encoding in sucha manner that either gain control numbers GAL0 to GAL11 or gain controlnumbers GAR0 to GAR11 are encoded into fixed-length codes, and, inencoding of the other set of gain control numbers, for any gain controlnumber GALi or GARi which is equal in value to a counterpart, only anencoding flag set to a value (0, in this case) indicating equality ofthe gain control number is encoded.

[0395] In the case in which gain control numbers GAL are encoded intocodes with a fixed bit length, coding of gain control numbers GAR isperformed in a manner described below with reference to a flow chartshown in FIG. 28.

[0396] In step S61, the encoder 81-6 detects a gain control number GALiand a gain control number GARi in the same frequency band from the inputgain control information GL0 to GL11 of the left-channel signal and gaincontrol information GR0 to GR11 of the right-channel signal,respectively, and determines whether the detected gain control numberGALi and gain control number GARi are equal in value to each other. Ifit is determined that they are equal to each other, the process proceedsto step S62.

[0397] In step S62, the encoder 81-6 sets the encoding flag associatedwith the gain control number GARi to 0. In the specific example shown inFIG. 27, the gain control number GAL2 (=1) is equal in value to the gaincontrol number GAR2 (=1), and thus the encoding flag associated with thegain control number GAR2 is set to 0.

[0398] However, in a case in which it is determined in step S61 that thegain control number GALi and the gain control number GARi-1 are notequal in value to each other, the process proceeds to step S63. In stepS63, the encoder 81-6 sets the encoding flag associated with the gaincontrol number GARi to 1. In step S64, the encoder 81-6 encodes the gaincontrol number GARi into a code with a fixed bit length (3 bits).

[0399] In the example shown in FIG. 27, a gain control number GAL0 (=1)and a gain control number GAR0 (=4) are not equal in value to eachother, and thus the encoding flag associated with the gain controlnumber GAR0 is set to 1, and a 3-bit code representing a value of 4 isassigned to the gain control number GAR0.

[0400] After step S62 in which the encoding flag is set to 0, or afterstep S64 in which the gain control number GARi is encoded into a 3-bitcode, the process proceeds to step S65. In step S65, the encoder 81-6determines whether all encoding flags have been set to 0 or 1 and allgain control numbers GAR corresponding to the encoding flags set to 1have been encoded into 3-bit codes, that is, the encoder 816 determineswhether all gain control numbers GAR0 to GAR11 have been encoded. If itis determined that all gain control numbers GARi have not been encoded,the process returns to step S61 to perform the step S61 and followingsteps to encode a next unencoded gain control number GARi.

[0401] If it is determined in step S65 that all gain control numbersGAR0 to GAR11 have been encoded, the process proceeds to step S66. Instep S66, the encoder 81-6 outputs the encoding flag set to 0 or 1 andthe codes to the terminal connected to the switch 83.

[0402] In the next step S67, the encoder 81-6 calculates the sum of thenumbers of bits of the encoded gain control numbers GAR0 to GAR11 andoutputs the calculated sum to the decision unit 82.

[0403] In the example shown in FIG. 27, as a result of encoding of thegain control numbers GAR, 12 1-bit encoding flags and a 3-bit codeassociated with the gain control number GAR0 are generated, and thus asignal indicating that the total number of bits is equal to 15 issupplied to the decision unit 82.

[0404] If the conventional fixed-length (3-bit) encoding method wereemployed, the gain control numbers GAR in the example shown in FIG. 27would be encoded into codes with a total of 36 (=3×12) bits. Thus, thetotal number of bits of encoded data according to the present inventionis smaller by 21 than that according to the conventional technique.

[0405] Although in the present embodiment, when the gain control numberGAi-1 and the gain control number GAi are not equal in value to eachother, the gain control number GAi is encoded into a code with the fixedbit length, the encoding may be performed according to another method.

[0406] The encoding method employed by the encoder 81-7 is described.

[0407] In the stereo audio signal, as shown in FIG. 29, the gain controlnumbers GAL0 to GAL11 of the left-channel signal often become equal tocorresponding gain control numbers GAR0 to GAR11 of the right-channelsignal in the same frequency band.

[0408] In view of the above, the encoder 81-7 encodes either gaincontrol numbers GAL0 to GAL11 or gain control numbers GAR0 to GAR11 intocodes with a fixed bit length. However, when the gain control numbersGAL0 to GAL11 and the corresponding gain control numbers GAR0 to GAR11are equal to each other, encoding of the other set of gain controlnumbers is not performed.

[0409] When gain control numbers GAL are encoded into codes with thefixed bit length, coding of gain control numbers GAR is performed in amanner described below with reference to a flow chart shown in FIG. 30.

[0410] In step S71, the encoder 81-7 detects gain control numbers GAL0to GAL11 and gain control numbers GAR0 to GAR11 from the input gaincontrol information GL0 to GL11 of the left-channel signal and gaincontrol information GR0 to GR11 of the right-channel signal,respectively. The encoder 81-7 then determines whether the gain controlnumbers GAL0 to GAL11 and the gain control numbers GAR0 to GAR11 are allequal to each other between corresponding counterparts. If it isdetermined that they are all equal to each other as is the case in theexample shown in FIG. 29, the process proceeds to step S72.

[0411] In step S72, the encoder 81-7 does not encode the gain controlnumbers GAR but the encoder 81-7 outputs a value of 0 indicating thatthe number of bits of codes is equal to 0 to the decision unit 82.

[0412] In a case in which it is determined in step S71 that the gaincontrol numbers GAL0 to GAL11 and the gain control numbers GAR0 to GAR11are not all equal to each other between corresponding counterparts, theprocess proceeds to step S73. In step S73, the encoder 81-7 encodes thegain control numbers GAR0 to GAR11 into 3-bit codes.

[0413] In the next step S74, the encoder 81-7 outputs the resultantcodes of the respective gain control numbers GAL0 to GAL11 to theterminal connected to the switch 83.

[0414] In step S75, the encoder 81-7 calculates the sum of the numbersof bits of the encoded gain control numbers GAL0 to GAL11 and outputsthe calculated sum to the decision unit 82.

[0415] In the example shown in FIG. 29, the total number of bits of thecodes of the gain control numbers GAL is equal to 36 (=3×12). Thus, asignal indicating that the total number of bits is equal to 36 issupplied to the decision unit 82.

[0416] After step S72 or step S75, the process performed by the encoder81-7 is completed.

[0417] If the conventional fixed-length (3-bit) encoding method wereemployed, the gain control numbers GAR in the example shown in FIG. 29would be encoded into codes with a total of 36 (=3×12) bits. Thus, whenthe gain control numbers GAR are not encoded, the total number of bitsof encoded data according to the present invention is smaller by 36 thanthat according to the conventional technique.

[0418] The encoding method employed by the encoder 81-8 is described.

[0419] As described earlier with reference to FIG. 15, the differencevalue VA obtained by subtracting a gain control number GAi-1 of a lowerfrequency band immediately adjacent to the frequency band of a gaincontrol number GAi from the gain control number GAi often becomes equalto a particular value.

[0420] Furthermore, in the case of stereo audio signals, as describedearlier with reference to FIG. 24, the difference value WA1 obtained bysubtracting a gain control number GALi from a gain control number GARiin the same frequency band has a high probability of becoming equal to aparticular value.

[0421] That is, the absolute value of the difference value WA2 obtainedby subtracting the difference value VA of the gain control number GARifrom the difference value VA of the gain control number GALi has a highprobability of becoming equal or nearly equal to 0, as shown in FIG. 31.

[0422] In view of the above, the encoder 81-8 encodes the gain controlnumber GA in such a manner that either gain control numbers GAL0 toGAL11 or gain control numbers GAR0 to GAR11 are encoded, and codes withsmall numbers of bits are assigned to gain control numbers GAcorresponding to difference values WA2 having high occurrenceprobabilities.

[0423] The operation of the encoder 81-8 is described below withreference to a flow chart shown in FIG. 32. Herein, it is assumed thatthe encoder 81-7 encodes the gain control number GAR.

[0424] In step S81, the encoder 81-8 detects a gain control number GALiand a gain control number GARi in the same frequency band from the inputgain control information GL0 to GL11 of the left-channel signal and gaincontrol information GR0 to GR11 of the right-channel signal,respectively, and determines the difference value VA of the gain controlnumber GALi by subtracting the gain control number GALi-1 of theencoding unit ALi-1, which was detected in previous execution of stepS81, from the gain control number GALi.

[0425] The encoder 81-8 also determines the difference value VA of thegain control number GARi by subtracting the gain control number GARi-1of the encoding unit ARi-1, which was detected in previous execution ofstep S81, from the gain control number GARi.

[0426] For example, in the case of gain control numbers GA0 to GA11shown in FIG. 33, the difference value VA of the gain control numberGAL1 (=1) is calculated as −1 (=gain control number GALL (=1)−gaincontrol number GAL0 (=2)) (not shown), and the difference value VA ofthe gain control number GAR1, of the gain control numbers GAR0 to GAR11,is calculated as 0 (=gain control number GAR1 (=1)−gain control numberGAR0 (=1)) (not shown).

[0427] In the next step S82, the encoder 81-8 calculates the differencevalue WA2 by subtracting the difference value VA of gain control numberGARi from the difference value VA of the gain control number GALi.

[0428] For example, the difference value WA2 of the gain control numberGAR1 is calculated as −1 (=gain control number GAL1 (=−1)−gain controlnumber GAR1 (=0)).

[0429] In the next step S83, the encoder 81-8 retrieves a codecorresponding to a value equal to the difference value WA2 calculated instep S82 from a table shown in FIG. 34 and employs the retrieved code asthe code of the gain control number GARi.

[0430] For example, in the case of the gain control number GAR1, thedifference value WA2 thereof is equal to −1 and thus a 2-bit code of“10” is employed as the code for the gain control number GAR1.

[0431] In the table shown in FIG. 34, a 2-bit code “10” is assigned to avalue −1, a 1-bit code “0” to a value 0, and a 3-bit code “110” to avalue 1.

[0432] Furthermore, in the table shown in FIG. 34, a procedure ofdetermining a code for a value other than the value of −1 to 1 isdefined (more specifically, the code is given by a formula 111+originalvalue). According to this procedure, a 6-bit code is given by acombination of a 3-bit code “111” and a following 3-bit code having avalue equal to the gain control number GA (original value, the gaincontrol number GAR in this specific case).

[0433] Referring again to FIG. 32, in step S84, the encoder 81-8determines whether codes have been determined for all gain controlnumbers GAR0 to GAR1, that is, whether all gain control numbers GAR0 toGAR11 have been encoded. If it is determined that all gain controlnumbers GARi have not been encoded, the process returns to step S81 toperform the step S81 and following steps to encode a next unencoded gaincontrol number GARi.

[0434] If it is determined in step S84 that all gain control numbersGAR0 to GAR11 have been encoded, the process proceeds to step S85. Instep S85, the encoder 81-8 outputs the codes determined in step S83 forthe respective gain control number GAR0 to GAR11 to the terminalconnected to the switch 83.

[0435] In the next step S86, the encoder 81-8 calculates the sum of thenumbers of bits of the encoded gain control numbers GAR0 to GAR11 andoutputs the calculated sum to the decision unit 82.

[0436] For example, the gain control numbers GAR shown in FIG. 33 areencoded into codes with numbers of bits such as those shown in FIG. 33,and thus the total number of bits of the codes becomes equal to 17.Thus, a signal indicating that the total number of bits is equal to 17is supplied to the decision unit 82.

[0437] If the conventional fixed-length (3-bit) encoding method wereemployed, the gain control numbers GAR in the example shown in FIG. 33would be encoded into codes with a total of 36 (=3×12) bits. Thus, thetotal number of bits of encoded data according to the present inventionis smaller by 19 than that according to the conventional technique.

[0438] Although in the encoding table (FIG. 34) used in the presentexample, escape codes are used for some values, specific codes includingno escape codes may be assigned to all respective values.

[0439] In the present example, the difference value WA2 is assumed tohave such a characteristic shown in FIG. 31. In a case in which thecharacteristic of the difference value WA2 varies from one encoding unitAi to another, the coding table may be switched depending on thecharacteristic of the difference value WA2.

[0440] In addition to above-described various methods employed by thegain control number encoder 71 to encode the gain control number, theremay be provided an additional encoder for encoding the gain controlnumber into a code with a fixed bit length according to the conventionaltechnique.

[0441] Now, the gain control amount information encoder 72 (FIG. 8) ofthe gain control information encoder 61 is described. FIG. 35 shows anexample of a construction of the gain control amount information encoder72.

[0442] The gain control information G0 to G11 output from the spectrumconverters 12-1 to 12-4 are input to each of 12 encoders 91-1 to 91-12.

[0443] The encoders 91-1 to 91-12 detect gain control amount informationGB0 to GB11 from the respective input gain control information G0 to G11and encode the detected gain control amount information GB0 to GB11 bymeans of predetermined encoding methods. Resultant encoded data areoutput to terminals connected to switch 93.

[0444] Each of the encoders 91-1 to 91-12 calculates the sum of thenumbers of bits of the encoded gain control numbers GB0 to GB11 andoutputs the calculated sum to the decision unit 92.

[0445] The decision unit 92 detects, among encoders 91-1 to 91-12, anencoder 91 which has output a smallest sum, that is, the decision unit92 detects an encoder 91 which has encoded the gain control numbers GB0to GB11 into a smallest total number of bits, and the decision unit 92controls the switch 93 so that the encoded gain control numbers GB0 toGB11 encoded by the detected encoder 91 are output to the multiplexer16. The decision unit 92 outputs information indicating the encodingmethod employed by the detected encoder 91 to the multiplexer 16. Thedecision unit 92 stores information indicating the encoding methodsemployed by the respective encoders 91.

[0446] The encoding methods employed by the respective encoders 91-1 to91-12 are described.

[0447] First, the encoding method employed by the encoder 91-1 isdescribed.

[0448] In the present example, gain control amount information GB ingain control information G has a 4-bit value serving as an indexindicating a gain control amount, and the value of the gain controlamount information GB has a high probability of becoming equal to aparticular value (such as 3, 5, 6, or 7) as shown in FIG. 36. In view ofthe above, the encoder 91-1 encodes gain control amount information GBsuch that codes with small numbers of bits are assigned to values havinghigh probabilities of occurring as gain control amount information GB.

[0449] The operation of the encoder 91-1 is described below withreference to a flow chart shown in FIG. 37.

[0450] In step S101, the encoder 91-1 detects gain control amountinformation GBi (i=0, 1, 2, . . . . , 11) of one frequency band from theinput gain control information G0 to G11.

[0451] In the next step S102, the encoder 91-1 determines a code to beassigned to the gain control number GBi. More specifically, the encoder91-1 retrieves a code corresponding to the gain control amountinformation GBi from a table shown in FIG. 38 and employs the retrievedcode as the code of the gain control amount information GBi.

[0452] For example, in the case of gain control amount information GB2of gain control amount information GB0 to GB11 shown in FIG. 39, thegain control amount information GB2 has a value of 7, and thus a 3-bitcode “101” is employed as the code of the gain control amountinformation GB2.

[0453] In the table shown in FIG. 38, a 3-bit code “110” is assigned toa value 3, a 1-bit code “0” to a value 5, a 3-bit code “100” to a value6, and a 3-bit code “101” to a value 7. Thus, if the encoder 91-1detects gain control amount information GBi having a value 3, 5, 6, or7, encoder 91-1 selects “110”, “0”, “100”, or “101” corresponding to thevalue of the gain control amount information GBi and employs it as thecode of the gain control amount information GBi.

[0454] Furthermore, in the table shown in FIG. 38, a procedure ofdetermining a code for a value other than 3, 5, 6, and 7 is defined(more specifically, the code is given by a formula 111+original value).According to this procedure, a 7-bit code is given by a combination of a3-bit code “111” (escape code) and a following 4-bit code indicating thegain control amount information GBi (original value). That is, if theencoder 91-1 detects gain control amount information GBi having a valueother than 3, 5, 6, and 7, the encoder 91-1 determines a 7-bit code viathe above-described procedure and employs it as the code for the gaincontrol amount information GBi.

[0455] In the next step S103, the encoder 91-1 determines whether codeshave been determined for all gain control amount information GB0 toGB11, that is, whether all gain control amount information GB0 to GB11have been encoded. If it is determined that all pieces of gain controlamount information GBi have not been encoded, the process returns tostep S101 to perform the step S101 and following steps to encode nextunencoded gain control amount information GBi.

[0456] If it is determined in step S103 that all gain control amountinformation GB0 to GB11 have been encoded, the process proceeds to stepS104. In step S104, the encoder 91-1 outputs the codes determined instep S102 for the respective gain control amount information GB0 to GB11to the terminal connected to the switch 93.

[0457] In the next step S105, the encoder 91-1 calculates the sum of thenumbers of bits of the encoded gain control numbers GB0 to GB11 andoutputs the calculated sum to the decision unit 92.

[0458] For example, the respective pieces of gain control amountinformation GB shown in FIG. 39 are encoded into codes with numbers ofbits such as those as shown in FIG. 39, and thus the total number ofbits of the codes becomes equal to 25. Thus, a signal indicating thatthe total number of bits is equal to 25 is supplied to the decision unit92.

[0459] If the conventional fixed-length (4-bit) encoding method wereemployed, the gain control amount information GB in the example shown inFIG. 39 would be encoded into codes with a total of 52 (=4×13) bits.Thus, the total number of bits of encoded data according to the presentinvention is smaller by 27 than that according to the conventionaltechnique.

[0460] Although in the coding table (FIG. 38) used in the presentexample, escape codes are used for some values, specific codes includingno escape code may be assigned to all respective values. In the presentexample, the gain control amount information GB is assumed to have sucha characteristic shown in FIG. 36. In the case in which thecharacteristic of the gain control amount information GB varies from oneencoding unit Ai to another, the coding table may be switched dependingon the characteristic of the gain control amount information GB.

[0461] In the case in which a waveform signal in a block includes oneattack portion AT and one release portion RE, two pieces of gain controlamount information GB having values corresponding to the level of a semistationary portion SS and the level of the release portion RE,respectively, are produced. For the reason described above, there can beplural pieces of gain control amount information GBi in one frequencyband (in the example shown in FIG. 39, there are two pieces of gaincontrol amount information GB1 (with values of 6 and 5, respectively)).Similarly, also in the case of gain control position information GCwhich will be described later, there can be plural pieces of gaincontrol position information GC in one frequency band.

[0462] In the present description, when there are plural pieces of gaincontrol amount information GBi, gain control amount information GBiindicating a gain control amount corresponding to the level of a part atan earlier position in a block is described first and gain controlamount information GBi indicating a gain control amount corresponding tothe level of a following part in the block is described at a location onthe right side of the description of the preceding part (as for the gaincontrol amount information GB1 in the example shown in FIG. 39, a valueof 6 is first described and 5 is described following 6). Hereinafter, ofplural pieces of gain control amount information GBi, gain controlamount information GBi described at the leftmost location (6 of gaincontrol amount information GB1 in the example shown in FIG. 39) will bereferred to as first gain control amount information GBi, and pieces ofgain control amount information GBi described one after another to theright following the first gain control amount information GBi will bereferred to as second gain control amount information GBi, third gaincontrol amount information GBi, and so on. As for gain control positioninformation GC, plural pieces of gain control position information GCwill be denoted in a similar manner.

[0463] The encoding method employed by the encoder 91-2 is described.

[0464] In the case in which there are plural pieces of gain controlamount information GBi as with gain control amount information GB1 shownin FIG. 39 or gain control amount information GB (except for gaincontrol amount information GB4) shown in FIG. 40, the difference valueVB1 obtained by subtracting Nth gain control amount information GBi from(N+1)th gain control amount information GBi has a high probability ofbecoming equal to a particular value (for N=1, 2, . . . ) as shown inFIG. 41.

[0465] In view of the above, the encoder 91-2 encodes the gain controlamount information GB in such a manner that codes with small numbers ofbits are assigned to difference values VB1 having high occurrenceprobabilities.

[0466] The operation of the encoder 91-2 is described below withreference to a flow chart shown in FIG. 42.

[0467] In step S111, the encoder 91-2 detects gain control amountinformation GBi (i=0, 1, 2., 11) from the input gain control informationG0 to G11 and calculates the difference value VB1 by subtracting Nthgain control amount information GBi of gain control amount informationGBi from (N+1)th gain control amount information GBi.

[0468] Hereinafter, for simplicity, the difference value VB1 obtained bysubtracting the Nth gain control amount information GBi from the (N+1)thgain control amount information GBi will be referred to simply as thedifference value VB1 of the (N+1)th gain control amount information GBi.

[0469] For example, in the case of gain control amount information GB0in the example shown in FIG. 40, the difference value VB1 of second gaincontrol amount information GB0 (=5) is given by a value (=−2) obtainedby subtracting first gain control amount information GB0) (=7) from thesecond gain control amount information GB0 (=5), and the differencevalue VB1 of third gain control amount information GB0 is given by avalue (=−1) obtained by subtracting the second gain control amountinformation GB0) (=5) from the third gain control amount information GB0(=4).

[0470] Referring again to FIG. 42, the encoder 91-2 determines, in stepS112, a code to be assigned to the gain control amount information GBi.

[0471] More specifically, the encoder 91-2 retrieves a codecorresponding to the first gain control amount information GBi of theplural pieces of gain control amount information GBi from a tablesimilar to that shown in FIG. 38 and employs the retrieved code as thecode of the first gain control amount information GBi.

[0472] For example, in the example shown in FIG. 40, a 3-bit code “101is employed as the code of first gain control amount information GB0(=7) of gain control amount information GB0.

[0473] The encoder 91-2 also retrieves a code corresponding to a valueequal to the difference value VB1 from a table shown in FIG. 43 andemploys the retrieved code as the code of the (N+1)th gain controlamount information GBi corresponding to the difference value VB1.

[0474] For example, in the case of gain control amount information GB0in the example shown in FIG. 40, the difference value VB1 of second gaincontrol amount information GB0 (=5) is −2, and thus a 2-bit code “10” isemployed as the code of the second gain control amount information GB0.As for third gain control amount information GB0 (=4), the differencevalue VB1 thereof is 1, and thus a 1-bit code “0” is employed as thecode thereof.

[0475] In the table shown in FIG. 43, a 5-bit code “11100” is assignedto a value −4, a 3-bit code “110” to a value −3, a 2-bit code “10” to avalue −2, a 1-bit code “0” is assigned to a value −1, and a 5-bit code“1111” to a value 1.

[0476] Furthermore, in the table shown in FIG. 43, a procedure ofdetermining a code for a value other than the values of −4 to 1 isdefined (more specifically, the code is given by a formula 1111+originalvalue). According to this procedure, an 8-bit code is given by acombination of a 4-bit code “1111” (escape code) and a following 4-bitcode indicating the gain control amount information GBi (originalvalue).

[0477] In step S113, the encoder 91-2 determines whether codes have beendetermined for all gain control amount information GB0 to GB11, that is,whether all gain control amount information GB0 to GB11 have beenencoded. If it is determined that all pieces of gain control amountinformation GBi have not been encoded, the process returns to step S111to perform the step S111 and following steps to encode next unencodedgain control amount information GBi.

[0478] If it is determined in step S113 that all gain control amountinformation GB0 to GB11 have been encoded, the process proceeds to stepS114. In step S114, the encoder 91-2 outputs the codes determined instep S112 for the respective gain control amount information GB0 to GB11to the terminal connected to the switch 93.

[0479] In the next step S115, the encoder 91-2 calculates the sum of thenumbers of bits of the encoded gain control numbers GB0 to GB11 andoutputs the calculated sum to the decision unit 92.

[0480] For example, the respective 38 pieces of gain control amountinformation GB shown in FIG. 40 are encoded into codes with numbers ofbits such as those shown in FIG. 40, and thus the total number of bitsof the codes becomes equal to 69. Thus, a signal indicating that thetotal number of bits is equal to 69 is supplied to the decision unit 92.

[0481] If the conventional fixed-length (4-bit) encoding method wereemployed, the gain control amount information GB in the example shown inFIG. 40 would be encoded into codes with a total of 152 (=4×38) bits.Thus, the total number of bits of encoded data according to the presentinvention is smaller by 83 than that according to the conventionaltechnique.

[0482] Although in the coding tables (FIGS. 38 and 43) used in thepresent example, escape codes are used for some values, specific codesincluding no escape code may be assigned to all respective values.

[0483] In the present example, the difference value VB1 is assumed tohave such a characteristic shown in FIG. 41. In a case in which thecharacteristic of the difference value VB1 varies from one encoding unitAi to another, the coding table may be switched depending on thecharacteristic of the difference value VB1.

[0484] The encoding method employed by the encoder 91-3 is described.

[0485] In most cases, the gain control amount information GBi of theencoding unit Ai and the gain control amount information GBi-1 of theencoding unit Ai-1 in a frequency band adjacent to that of the encodingunit Ai are equal or close to each other. Therefore, the absolute valueof the difference value VB2 obtained by subtracting the gain controlamount information GBi-1 from the gain control amount information GBihas a high probability of becoming equal or nearly equal to 0, as shownin FIG. 44.

[0486] In view of the above, the encoder 91-3 encodes the gain controlamount information GB in such a manner that codes with small numbers ofbits are assigned to difference values VB2 having high occurrenceprobabilities.

[0487] The operation of the encoder 91-3 is described below withreference to a flow chart shown in FIG. 45.

[0488] In step S121, the encoder 91-3 detects gain control amountinformation GBi of one frequency band from the input gain controlinformation G0 to G11 and determines the difference value VB2 bysubtracting, from the gain control amount information GBi, the gaincontrol amount information GBi-1 of the encoding unit Ai-1 which is in alower frequency band adjacent to the frequency band of the encoding unitAi and which was detected in previous execution of step S121.

[0489] Hereinafter, for simplicity, the difference value VB2 obtained bysubtracting the gain control amount information GBi-1 from the gaincontrol amount information GBi will be referred to simply as thedifference value VB2 of the gain control amount information GBi.

[0490] For example, when the gain control amount information GB0 to GB11are given as shown in FIG. 46, the difference value VB2 of gain controlamount information GB3 is calculated as follows. That is, by subtractingthe first gain control amount information GB2 (=7) from the first gaincontrol amount information GB3 (=7), the difference value VB2 of thefirst gain control amount information GB3 (=7) is calculated as 0.Similarly, by subtracting the second gain control amount information GB2(=6) from the second gain control amount information GB3 (=6), thedifference value VB2 of the second gain control amount information GB3(=6) is calculated as 0.

[0491] For the gain control amount information GB2, by subtracting thegain control amount information GB1 (=5) from the first gain controlamount information GB2 (=7), the difference value VB2 of the first gaincontrol amount information GB2 is calculated as 2, and by subtracting 5from the second gain control amount information GB2 (=6), the differencevalue VB2 of the second gain control amount information GB2 (=6) iscalculated as i. For the gain control amount information GB1, bysubtracting 5 from the gain control amount information GB1 (=5), thedifference value VB2 of the gain control amount information GB1 (=5) iscalculated as 0.

[0492] That is, in the case in which there is no gain control amountinformation GBi-1 corresponding to gain control amount information GBi,the difference value VB2 of the gain control amount information GBi isdetermined by subtracting a value of GB which is highest in occurrenceprobability, that is, 5, as shown in FIG. 36, from the value of the gaincontrol amount information GBi.

[0493] Referring again to FIG. 45, in step S122, the encoder 91-3retrieves a code corresponding to a value equal to the difference valueVB2 calculated in step S121 from a table shown in FIG. 47 and employsthe retrieved code as the code of the gain control amount informationGBi.

[0494] For example, in the case of gain control amount information GB2in the example shown in FIG. 46, the difference value VB2 of the firstgain control amount information GB2 (=7) is 2, and thus a 4-bit code“11110” is employed as the code for the gain control amount informationGB2. Similarly, a 3-bit code “100” is employed for the second gaincontrol amount information GB2 (=6) because the difference value VB2 ofthe second gain control amount information GB2 (=6) is 1.

[0495] In the table shown in FIG. 47, a 5-bit code “11110” is assignedto a value −3, a 3-bit code “110” to a value −2, a 3-bit code “101” to avalue −1, a 1-bit code “0” to a value 0, a 3-bit code “100” to a value1, and a 4-bit code “1110” to a value 2.

[0496] Furthermore, in the table shown in FIG. 47, a procedure ofdetermining a code for a value other than the values of −3 to 2 isdefined (more specifically, the code is given by a formula11111+original value). According to this procedure, a 9-bit code isgiven by a combination of a 5-bit code “11111” and a following 4-bitcode indicating the gain control amount information GB (original value).

[0497] In the next step S123, the encoder 91-3 determines whether codeshave been determined for all gain control amount information GB0 toGB11, that is, whether all gain control amount information GB0 to GB11have been encoded. If it is determined that all pieces of gain controlamount information GBi have not been encoded, the process returns tostep S121 to perform the step S121 and following steps to encode nextunencoded gain control amount information GBi.

[0498] If it is determined in step S123 that all gain control amountinformation GB0 to GB11 have been encoded, the process proceeds to stepS124. In step S124, the encoder 91-4 outputs the codes determined instep S122 for the respective gain control amount information GB0 to GB11to the terminal connected to the switch 93.

[0499] In the next step S125, the encoder 91-3 calculates the sum of thenumbers of bits of the encoded gain control numbers GB0 to GB11 andoutputs the calculated sum to the decision unit 92.

[0500] For example, the respective 17 pieces of gain control amountinformation GB shown in FIG. 46 are encoded into bit-codes as shown inFIG. 46, and thus the total number of bits of the codes becomes equal to35. Thus, a signal indicating that the total number of bits is equal to35 is supplied to the decision unit 92.

[0501] If the conventional fixed-length (4-bit) encoding method wereemployed, the gain control amount information GB in the example shown inFIG. 46 would be encoded into codes with a total of 68 (=4×17) bits.Thus, the total number of bits of encoded data according to the presentinvention is smaller by 33 than that according to the conventionaltechnique.

[0502] Although in the coding table (FIG. 47) used in the presentexample, escape codes are used for some values, specific codes includingno escape code may be assigned to all respective values.

[0503] In the present example, the difference value VB2 of the gaincontrol amount information GB is assumed to have such a characteristicshown in FIG. 44. In a case in which the characteristic of thedifference value VB2 varies from one encoding unit Ai to another, thecoding table may be switched depending on the characteristic of thedifference value VB2.

[0504] The encoding method employed by the encoder 91-4 is described.

[0505] As described earlier with reference to FIG. 41, the differencevalue VB1 obtained by subtracting the Nth gain control amountinformation GBi from the (N+1)th gain control amount information GBi hasa high probability of becoming equal to a particular value.

[0506] Furthermore, as described earlier with reference to FIG. 44, thedifference value VB2 obtained by subtracting gain control amountinformation GBi-1 from gain control amount information GBi also has ahigh probability of becoming equal to a particular value.

[0507] Therefore, for example, the difference value VB3 obtained bysubtracting the difference value VB1 of the Nth gain control amountinformation GBi from the difference value VB1 of the Nth gain controlamount information GBi-i has a high probability of becoming equal to aparticular value (0 or a value whose absolute value is close to 0) asshown in FIG. 48.

[0508] In view of the above, the encoder 91-4 encodes the gain controlamount information GB in such a manner that codes with small numbers ofbits are assigned to difference values VB3 having high occurrenceprobabilities.

[0509] The operation of the encoder 91-4 is described below withreference to a flow chart shown in FIG. 49.

[0510] In step S131, the encoder 91-4 detects gain control amountinformation GBi of one frequency band from the input gain controlinformation G0 to G11 and calculates the difference value VB1 (thedifference value B1 of the (N+1)th gain control amount information GBi)by subtracting the Nth gain control amount information GBi from the(N+1)th gain control amount information GBi.

[0511] For example, for gain control amount information GB1 of gaincontrol amount information GB0 to GB11 shown in FIG. 50, the differencevalue VB1 of the second gain control amount information GB1 (=4) iscalculated as −1 by subtracting the first gain control amountinformation GB1 (=5) from the second gain control amount information GB1(=4), and the difference value VB1 of the third gain control amountinformation GB1 (=3) is calculated as −1 by subtracting the second gaincontrol amount information GB1 (=4) from the third gain control amountinformation GB1 (=3).

[0512] In a similar manner, the difference value VB1 of the gain controlamount information GBi following the second gain control amountinformation GBi (that is, the (N+1)th gain control amount informationGBi) can be determined. For the first gain control amount informationGBi, the difference value VB1 thereof is determined by subtracting thefirst gain control amount information GBi-1 detected in previousexecution of step S131 from the first gain control amount informationGBi.

[0513] In the specific example shown in FIG. 50, the difference valueVB1 of the first gain control amount information GB1 of the gain controlamount information GB1 is calculated as 0 by subtracting the first gaincontrol amount information GB0 (=5) from the first gain control amountinformation GB1 (=5).

[0514] Of the gain control amount information GBi, the difference valueVB1 of the first gain control amount information GB0 of the gain controlamount information GB0 is given by subtracting a value of GB which ishighest in occurrence probability, that is, 5 in this specific example(FIG. 36), from the value of the first gain control amount informationGB0. More specifically, in the example shown in FIG. 50, the differencevalue VB1 of the first gain control amount information GB0 (=5) of thegain control amount information GB0 is calculated as 0 (=5−5).

[0515] In the next step S132, the encoder 91-4 determines the differencevalue VB3 by subtracting the difference value VB1 of the gain controlamount information GBi-1 determined in the previous execution of stepS131 from the difference value VB1 of the gain control amountinformation GBi determined in step S131.

[0516] Hereinafter, for simplicity, the difference value VB3 obtained bysubtracting the difference value VB1 of the gain control amountinformation GBi-1 from the difference value VB1 of the gain controlamount information GBi will be referred to simply as the differencevalue VB3 of the gain control amount information GBi.

[0517] The difference value VB3 of the first gain control amountinformation GB is given by the same value as that of the differencevalue VB1 of the first gain control amount information GB.

[0518] For example, as for gain control amount information GB2 in theexample shown in FIG. 50, the difference value VB1 of the first gaincontrol amount information GB2 (=7) is given as 2, and the same value isgiven as the difference value VB3 of the first gain control amountinformation GB2 (=7), and the value (=−1) obtained by subtracting thesecond difference value VB1 (=−1) of the second gain control amountinformation GB1 (=4) from the difference value (=−2) of the second gaincontrol amount information GB2 (=5) is given as the difference value VB3of the gain control amount information GB2 (=5). Furthermore, the value(=0) obtained by subtracting the difference value VB1 (=−1) of the thirdgain control amount information GB1 (=3) from the difference value VB1(=−1) of the third gain control amount information GB2 (=4) is given asthe difference value VB3 of the third gain control amount informationGB2 (=4).

[0519] In this specific example, the difference value VB3 of the gaincontrol amount information GB0 becomes equal to the difference valueVB1. That is, as for the gain control amount information GB0 in theexample shown in FIG. 50, difference values VB3 are 5, −1, and −2.

[0520] In the next step S133, the encoder 91-4 retrieves a codecorresponding to a value equal to the difference value VB3 calculated instep S132 from a table shown in FIG. 51 and employs the retrieved codeas the code of the gain control amount information GBi.

[0521] In the table shown in FIG. 51, a 5-bit code “11110” is assignedto a value −3, a 3-bit code 11110” to a value −2, a 1-bit code “0” to avalue −1, a 2-bit code “10” to a value 0, and a 4-bit code “1110” to avalue 1.

[0522] Furthermore, in the table shown in FIG. 51, a procedure ofdetermining a code for a value other than the values of −3 to 1 isdefined (more specifically, the code is given by a formula11111+original value). According to this procedure, a 9-bit code isgiven by a combination of a 5-bit code “11111” and a following 4-bitcode indicating the gain control amount information GB (original value).

[0523] In the next step S134, the encoder 91-4 determines whether codeshave been determined for all gain control amount information GB0 toGB11, that is, whether all gain control amount information GB0 to GB11have been encoded. If it is determined that all pieces of gain controlamount information GBi have not been encoded, the process returns tostep S131 to perform the step S131 and following steps to encode nextunencoded gain control amount information GBi.

[0524] If it is determined in step S134 that all gain control amountinformation GB0 to GB11 have been encoded, the process proceeds to stepS135. In step S135, the encoder 91-4 outputs the codes determined instep S133 for the respective gain control amount information GB0 to GB11to the terminal connected to the switch 93.

[0525] In the next step S316, the encoder 91-4 calculates the sum of thenumbers of bits of the encoded gain control numbers GB0 to GB11 andoutputs the calculated sum to the decision unit 92.

[0526] For example, as for 36 pieces of gain control amount informationGB shown in FIG. 50, codes with numbers of bits as shown in FIG. 50 aregenerated as a result of encoding and thus a signal indicating that thetotal number of bits of the codes is 91 is output to the decision unit92.

[0527] If the conventional fixed-length (4-bit) encoding method wereemployed, the gain control amount information GB in the example shown inFIG. 50 would be encoded into codes with a total of 144 (=4×36) bits.Thus, the total number of bits of encoded data according to the presentinvention is smaller by 53 than that according to the conventionaltechnique.

[0528] The encoding method employed by the encoder 91-5 is described.

[0529] In gain control amount information GBi-1 and gain control amountinformation GBi, in some cases, there are an equal number of pieces ofgain control amount information GB, and, besides, Nth gain controlamount information GBi and corresponding Nth gain control amountinformation GBi-1 are equal in value to each other, as is the case, forexample, with gain control amount information GB0 and gain controlamount information GB1 shown in FIG. 52.

[0530] In view of the above, the encoder 91-5 encodes the gain controlamount information GB in such a manner that when, in gain control amountinformation GBi-1 and gain control amount information GBi, there are anequal number of pieces of gain control amount information GB and Nthgain control amount information GBi-1 and corresponding Nth gain controlamount information GBi are equal to each other, only a flag (encodingflag) set to a value (0, in this specific example) indicating the abovefact is encoded.

[0531] The operation of the encoder 91-5 is described below withreference to a flow chart shown in FIG. 53.

[0532] In step S141, the encoder 91-5 detects gain control amountinformation GBi of one frequency band from the input gain controlinformation G0 to G11. The encoder 91-5 determines whether there are anequal number of pieces of gain control amount information GB in boththat gain control amount information GBi and gain control amountinformation GBi-1 detected in previous execution of step S141, andbesides Nth gain control amount information GBi and corresponding Nthgain control amount information GBi-1 are equal in value to each other.If it is determined that there are an equal number of pieces of gaincontrol amount information GB, and Nth gain control amount informationGBi and corresponding Nth gain control amount information GBi-1 areequal in value to each other, the process proceeds to step S142. In stepS142, the encoding flag associated with the gain control amountinformation GBi is set to a value (0, in this specific example) so as toindicate the above fact.

[0533] For example, in gain control amount information GB1 and gaincontrol amount information GB0 in the example shown in FIG. 52, thereare equally three pieces of gain control amount information GB andfirst, second, and third gain control amount information GB1 (=7, 5, and4) are equal in value to first, second, and third gain control amountinformation GB0 (=7, 5, and 4), respectively, and thus the encoding flagassociated with the gain control amount information GB1 is set to 0.

[0534] In the case in which it is determined in step S141 that thenumber of pieces of gain control amount information GB in gain controlamount information GBi is not equal to that in gain control amountinformation GBi-1, or Nth gain control amount information GBi is notequal in value to corresponding Nth gain control amount informationGBi-1, the process jumps to step S143. In step S143, the encoder 91-5sets the encoding flag associated with the gain control amountinformation GBi to a value (1, in this case) so as to indicate the abovefact.

[0535] For example, as for gain control amount information GB2 and gaincontrol amount information GB1 in the example shown in FIG. 52, thenumber of pieces of gain control amount information GB is differentbetween them, and thus the encoding flag associated with the gaincontrol amount information GB2 is set to 1.

[0536] In the next step S144, the encoder 91-5 encodes the gain controlamount information GBi in a similar manner as with, for example, theencoder 91-2.

[0537] More specifically, the encoder 91-5 retrieves a codecorresponding to the first gain control amount information GBi from atable similar to that shown in FIG. 38 and employs the retrieved code asthe code of the first gain control amount information GBi.

[0538] Furthermore, the encoder 91-5 calculates the difference value VB1of the (N+1)th gain control amount information GBi by subtracting theNth gain control amount information GBi from the (N+1)th gain controlamount information GBi, and the encoder 91-5 then retrieves a codecorresponding to the calculated difference value VB1 from the tableshown in FIG. 43 and employs the retrieved code as the code for the(N+1)th gain control amount information GBi.

[0539] For example, as for gain control amount information GB2 in theexample shown in FIG. 52, a 3-bit code “101” is employed as the code offirst gain control amount information GB2 (=7), and, because thedifference value VB1 of second gain control amount information GB2 (=6)is −1, a 1-bit code “0” is employed as the code of the second gaincontrol amount information GB2.

[0540] In this specific example, there is no encoding flag associatedwith gain control amount information GB0, and the code of the gaincontrol amount information GB0 is determined in step S144 as with gaincontrol amount information GB corresponding to an encoding flag set to1.

[0541] In the case in which an encoding flag has been set to 0 in stepS142 or in the case in which gain control amount information GBi hasbeen encoded in step S144, the process proceeds to step S145. In stepS145, the encoder 91-5 determines whether all encoding flags associatedwith respective gain control amount information GB0 to GB11 have beenset to 0 or 1 and codes have been determined for all pieces of gaincontrol amount information GBi corresponding to encoding flags set to 1,that is, the encoder 91-5 determines whether gain control amountinformation GB0 to GB11 have all been encoded. If it is determined thatall pieces of gain control amount information GBi have not been encoded,the process returns to step S141 to perform the step S141 and followingsteps to encode next unencoded gain control amount information GBi.

[0542] If it is determined in step S145 that all gain control amountinformation GB0 to GB11 have been encoded, the process proceeds to stepS146. In step S146, the encoder 91-5 outputs the encoding flag set to 0or 1 and the codes to the terminal connected to the switch 93.

[0543] In the next step S147, the encoder 91-5 calculates the sum of thenumbers of bits of the encoded gain control numbers GB0 to GB11 andoutputs the calculated sum to the decision unit 92.

[0544] For example, as for 36 pieces of gain control amount informationGB shown in FIG. 52, 11 1-bit encoding flags and codes with numbers ofbits as shown in FIG. 52 are generated as a result of encoding and thusa signal indicating that the total number of bits is equal to 38(=11+27) is supplied to the decision unit 92.

[0545] If the conventional fixed-length (4-bit) encoding method wereemployed, the gain control amount information GB in the example shown inFIG. 52 would be encoded into codes with a total of 144 (=4×36) bits.Thus, the total number of bits of encoded data according to the presentinvention is smaller by 106 than that according to the conventionaltechnique.

[0546] Although in the example described above, when there is adifference in the number of gain control amount information GB betweengain control amount information GBi and gain control amount informationGBi-1, or when there is a difference in value between Nth gain controlamount information GBi and corresponding Nth gain control amountinformation GBi-1, encoding of gain control amount information GBi isperformed in a similar manner as with the encoder 91-2, the encoding maybe performed according to another method.

[0547] The encoding method employed by the encoder 91-6 is described.

[0548] In most cases, a plurality of values of gain control amountinformation GBi are close to each other as in the case of gain controlamount information GB7 of gain control amount information GB0 to GB11shown in FIG. 54. Therefore, values obtained by subtracting a minimumvalue of the values of gain control amount information GBi fromrespective values of gain control amount information GBi become smallenough to represent with a small number of bits.

[0549] In view of the above, the encoder 91-6 encodes gain controlamount information GB such that the value obtained by subtracting theminimum value of gain control amount information GBi from Nth gaincontrol amount information GBi is expressed using a particular number ofbits and the resultant expression is assigned as the code of the Nthgain control amount information GBi.

[0550] The operation of the encoder 91-6 is described below withreference to a flow chart shown in FIG. 55.

[0551] In step S151, the encoder 91-6 detects gain control amountinformation GBi of one frequency band from the input gain controlinformation G0 to G11.

[0552] In the next step S152, the encoder 91-6 determines a code to beassigned to the gain control amount information GBi. The details of theprocess in step S152 are shown in the form of a flow chart in FIG. 56.

[0553] In step S161, the encoder 91-6 detects maximum and minimum valuesof the gain control amount information GBi.

[0554] In the example shown in FIG. 54, 9 is detected as the maximumvalue and 6 is detected as the minimum value.

[0555] In step S162, the encoder 91-6 calculates the difference betweenthe maximum and minimum values detected in step S161 and determines thenumber of bits which can represent the difference.

[0556] In the example shown in FIG. 54, the difference between themaximum value (9) and the minimum value (6) is equal to 3, and thus thenumber of bits which can represent the difference is 2.

[0557] In step S163, the encoder 91-6 subtracts the minimum valuedetected in step S161 from respective values of gain control amountinformation GBi and represents the resultant difference values using asmany bits as the necessary number of bits determined in sep S162. Theresultant values are employed as codes for the respective pieces of gaincontrol amount information GBi. Because the necessary number of bits isdefined as the number of bits which can represent the difference betweenthe maximum value and the minimum value, the value obtained bysubtracting the minimum value from any gain control amount informationGBi can be represented using as many bits as the necessary number ofbits.

[0558] In the example shown in FIG. 54, subtracting 6 from first gaincontrol amount information GB7 (=9), second gain control amountinformation GB7 (=7), third gain control amount information GB7 (=6),and fourth gain control amount information GC7 (=9) yields 3, 1, 0, and3, respectively, and 2-bit expressions of these values are employed asthe codes of first to fourth gain control amount information GB7.

[0559] Thereafter, the process proceeds to step S153 shown in FIG. 55.

[0560] In step S153, the encoder 91-6 determines whether codes have beendetermined for all gain control amount information GB0 to GB11, that is,whether all gain control amount information GB0 to GB11 have beenencoded. If it is determined that all pieces of gain control amountinformation GBi have not been encoded, the process returns to step S151to perform the step S151 and following steps to encode next unencodedgain control amount information GBi.

[0561] If it is determined in step S153 that all gain control amountinformation GB0 to GB11 have been encoded, the process proceeds to stepS154. In step S154, the data indicating the minimum value detected instep S161, the data indicating the necessary number of bits calculatedin step S162, and the codes, determined in step S163, of gain controlamount information GB0 to GB11 represented by as many bits as thenecessary number of bits are output from the encoder 91-6 to theterminal connected to the switch 93.

[0562] In the next step S155, the encoder 91-6 calculates the sum of thenumbers of bits of the encoded gain control numbers GB0 to GB11 andoutputs the calculated sum to the decision unit 92.

[0563] For example, as for gain control amount information GB7 shown inFIG. 54, 2-bit data indicating a necessary number of bits, 4-bit dataindicating a minimum value, and 4 2-bit codes (represented by as manybits as the necessary number of bits are generated as the result of theencoding of the gain control amount information GB7, and thus a signalindicating that the total number of bits is equal to 14 (=2+4+2×4) issupplied to the decision unit 92.

[0564] If the conventional fixed-length (4-bit) encoding method wereemployed, the gain control amount information GB in the example shown inFIG. 54 would be encoded into codes with a total of 16 (=4×4) bits.Thus, the total number of bits of encoded data according to the presentinvention is smaller by 2 than that according to the conventionaltechnique.

[0565] The encoding method employed by the encoder 91-7 is described.

[0566] In most cases, because gain control amount information GB0 toGB11 are close in value to each other as in the case with gain controlamount information GB0 to GB11 shown in FIG. 57, subtracting the minimumvalue (5, in the example shown in FIG. 57) of the gain control amountinformation GB0 to GB11 from the respective values of gain controlamount information GBi results in small values which can be representedusing a small number of bits.

[0567] In view of the above, the encoder 91-7 encodes gain controlamount information GB in such a manner that the minimum value of thegain control amount information GB0 to GB11 is subtracted from eachpiece of gain control amount information GBi and an expression of theresultant difference using a particular number of bits is employed asthe code of the gain control amount information GBi.

[0568] The operation of the encoder 91-7 is described below withreference to a flow chart shown in FIG. 58.

[0569] In step S171, the encoder 91-7 extracts gain control amountinformation GB0 to GB11 from the input gain control information G0 toG11 and detects maximum and minimum values of the extracted gain controlamount information GB0 to GB11.

[0570] In the example shown in FIG. 57, the maximum value of gaincontrol amount information GB0 to GB11 is detected as 8 and the minimumvalue as 5.

[0571] In step S172, the encoder 91-7 calculates the difference betweenthe maximum and minimum values detected in step S171 and determines thenumber of bits which can represent the difference.

[0572] In the example shown in FIG. 57, the difference between themaximum value (8) and the minimum value (5) is equal to 3, and thus thenumber of bits which can represent the difference is 2.

[0573] In step S173, the encoder 91-7 subtracts the minimum valuedetected in step S171 from the respective values of gain control amountinformation GB0 to GB11 and represents the resultant difference valuesusing as many bits as the necessary number of bits determined in sepS172. The resultant values are employed as codes for the respectivepieces of gain control amount information GB. Because the necessarynumber of bits is defined as the number of bits which can represent thedifference between the maximum value and the minimum value, the valueobtained by subtracting the minimum value from any gain control amountinformation GB can be represented using as many bits as the necessarynumber of bits.

[0574] In step S174, the data indicating the minimum value detected instep S171, the data indicating the necessary number of bits calculatedin step S172, and the codes, determined in step S173, of gain controlamount information GB represented by as many bits as the necessarynumber of bits are output from the encoder 91-7 to the terminalconnected the switch 93.

[0575] In the example shown in FIG. 57, 4-bit data indicating a minimumvalue (=5), 2-bit data indicating a necessary number of bits (2 bits),and 26 2-bit codes (represented by as many bits as the necessary numberof bits) are output to the switch 93 as shown in FIG. 59.

[0576] In the next step S175, the encoder 91-7 calculates the sum of thenumbers of bits of the encoded gain control numbers GB0 to GB11 andoutputs the calculated sum to the decision unit 92.

[0577] For example, in the case of gain control amount information GBshown in FIG. 57, 2-bit data indicating the necessary number of bits,4-bit data indicating the minimum value, and 26 codes each representedby 2 bits (=necessary number of bits) are produced as the result of theencoding of the gain control amount information GB and thus a signalindicating that the total number of bits is 58 (=2+4+2×26) is output tothe decision unit 92.

[0578] If the conventional fixed-length (4-bit) encoding method wereemployed, the gain control amount information GB in the example shown inFIG. 57 would be encoded into codes with a total of 104 (=4×26) bits.Thus, the total number of bits of encoded data according to the presentinvention is smaller by 46 than that according to the conventionaltechnique.

[0579] The encoding method employed by the encoder 91-8 is described.

[0580] In most cases, in the stereo audio signal, the gain controlamount information GBLi of the left-channel signal and the gain controlamount information GBRi of the right-channel signal in the samefrequency band are equal or close to each other. Therefore, the absolutevalue of the difference value WB1 obtained by subtracting the gaincontrol amount information GBLi from the gain control amount informationGBRi has a high probability of becoming equal or nearly equal to 0, asshown in FIG. 60.

[0581] In view of the above, the encoder 91-8 encodes gain controlamount information GB such that only either gain control amountinformation GBL0 to GAL11 or gain control amount information GBR0 toGBR11 are encoded, and codes with small numbers of bits are assigned todifference values WB1 having high occurrence probabilities. That is, oneof the gain control amount information GBL and the gain control amountinformation GBR is encoded by means of the above method, and the otheris encoded by means of, for example, the conventional encoding method.

[0582] The operation of the encoder 91-8 is described below withreference to a flow chart shown in FIG. 61. Herein, it is assumed thatthe encoder 91-8 encodes gain control amount information GBR.

[0583] In step S181, the encoder 91-8 detects gain control amountinformation GBLi in one frequency band from gain control information GL0to GL11 of the input left-channel signal and also detects gain controlamount information GBRi in the same frequency band from gain controlinformation GR0 to GR11 of the input right-channel signal. The encoder91-8 then calculates the difference value WB1 by subtracting the gaincontrol amount information GBLi from the gain control amount informationGBRi.

[0584] Hereinafter, for simplicity, the difference value WB1 obtained bysubtracting the gain control amount information GBLi from the gaincontrol amount information GBRi will be referred to simply as thedifference value WB1 of the gain control amount information GBRi.

[0585] For example, in the case of gain control amount information GBL3of gain control amount information GBL0 to GBL11 or gain control amountinformation GBR3 of gain control amount information GBR0 to GBR11 shownin FIG. 62, the difference value WB1 of first gain control amountinformation GBR3 is given by a value (=−1) obtained by subtracting thefirst gain control amount information GBL3 (=5) from the first gaincontrol amount information GBR3 (=4), and the difference value WB1 ofsecond gain control amount information GBR3 is given by a value (=0)obtained by subtracting the second gain control amount information GBL3(=2) from the second gain control amount information GBR3 (=2).

[0586] In the next step S182, the encoder 91-8 retrieves a codecorresponding to a value equal to the difference value WB1 calculated instep S181 from a table shown in FIG. 63 and employs the retrieved codeas the code for the gain control amount information GBRi.

[0587] For example, in the case of gain control amount information GBR3,the difference value WB1 of first gain control amount information GGR3(=4) is −1, and thus a 3 bit code “110” is employed as the code of thefirst gain control amount information GGR3, while the difference valueWB1 of second gain control amount information GGR3 (=2) is 0, and thus a1-bit code “0” is employed as the code of the second gain control amountinformation GGR3.

[0588] In the table shown in FIG. 63, a 5-bit code “1110” is assigned toa value −2, a 3-bit code “110” to a value −1, a 1-bit code “0” to avalue 0, a 2-bit code “10” to a value 1, and a 5-bit code “11110” to avalue 2.

[0589] Furthermore, in the table shown in FIG. 63, a procedure ofdetermining a code for a value other than the values of −2 to 2 isdefined (more specifically, the code is given by a formula11111+original value). According to this procedure, a 9-bit code isgiven by a combination of a 5-bit code “11111” and a following 4-bitcode indicating the gain control amount information GB (original value,the gain control amount information GBR in this specific case).

[0590] In step S183, the encoder 91-8 determines whether codes have beendetermined for all gain control amount information GBR0 to GBR11, thatis, whether all gain control amount information GBR0 to GBR11 have beenencoded. If it is determined that all pieces of gain control amountinformation GBR have not been encoded, the process returns to step S181to perform the step S181 and following steps to encode next unencodedgain control amount information GBRi.

[0591] If it is determined in step S183 that all gain control amountinformation GBR0 to GBR11 have been encoded, the process proceeds tostep S184. In step S184, the encoder 91-8 outputs the codes determinedin step S182 for the respective gain control amount information GBR0 toGBR11 to the terminal connected to the switch 93.

[0592] In step S185, the encoder 91-8 calculates the sum of the numbersof bits of the encoded gain control numbers GBR0 to GBR11 and outputsthe calculated sum to the decision unit 92.

[0593] For example, in the case of 16 pieces of gain control amountinformation GBR shown in FIG. 62, codes with numbers of bits such asthose shown in FIG. 62 are generated as the result of encoding, and thusa signal indicating that the total number of bits is equal to 21 isoutput to the decision unit 92.

[0594] If the conventional fixed-length (4-bit) encoding method wereemployed, the gain control amount information GBR in the example shownin FIG. 62 would be encoded into codes with a total of 64 (=4×16) bits.Thus, the total number of bits of encoded data according to the presentinvention is smaller by 43 than that according to the conventionaltechnique.

[0595] Although in the coding table (FIG. 63) used in the presentexample, escape codes are used for some values, specific codes includingno escape code may be assigned to all respective values.

[0596] In the present example, the difference value WB1 of the gaincontrol amount information GBL and that of the gain control amountinformation GBR are assumed to have such a characteristic shown in FIG.60. In a case in which the characteristic of the difference value WB1varies from one encoding unit Ai to another, the coding table may beswitched depending on the characteristic of the difference value WB1.

[0597] The encoding method employed by the encoder 91-9 is described.

[0598] In many cases, in gain control amount information GBLi of aleft-channel signal and gain control amount information GBRi of aright-channel signal in the same frequency band of a stereo audiosignal, there are an equal number of pieces of gain control amountinformation GB and, besides, Nth gain control amount information GBLiand corresponding Nth gain control amount information GBRi are equal toeach other, as is the case with gain control amount information GBL1 andgain control amount information GBR1 of gain control amount informationGBL0 to GBL11 and gain control amount information GBR0 to GBR11 shown inFIG. 64.

[0599] In view of the above, the encoder 91-9 encodes either gaincontrol amount information GBL0 to GBL11 or gain control amountinformation GBR0 to GBR11 into codes with a fixed bit length and encodesthe other in such manner that when, in gain control amount informationGBLi and gain control amount information GBRi, there are an equal numberof pieces of gain control amount information GB and, besides, Nth gaincontrol amount information GBLi and corresponding Nth gain controlamount information GBRi are equal to each other, only a flag (encodingflag) set to a value (0, in this specific example) indicating the abovefact is encoded.

[0600] In the case in which gain control amount information GBL isencoded into codes with a fixed bit length, coding of gain controlamount information GBR is performed in a manner described below withreference to a flow chart shown in FIG. 65.

[0601] In step S191, the encoder 91-9 detects gain control amountinformation GBLi in one frequency band from gain control information GL0to GL11 of the input left-channel signal and also detects gain controlamount information GBRi in the same frequency band from gain controlinformation GR0 to GR11 of the input right-channel signal. The encoder91-9 determines whether there are an equal number of pieces of gaincontrol amount information GB in both gain control amount informationGBLi and gain control amount information GBRi and Nth gain controlamount information GBLi and corresponding Nth gain control amountinformation GBRi are equal to each other. If it is determined that thereare an equal number of pieces of gain control amount information GB, andNth gain control amount information GBLi and corresponding Nth gaincontrol amount information GBRi are equal to each other, the processproceeds to step S192. In step S192, the encoding flag associated withthe gain control amount information GBRi is set to a value (0, in thisspecific example) so as to indicate the above fact.

[0602] For example, in the case of gain control amount information GBL1and gain control amount information GBR1 in the example shown in FIG.64, there are equally two pieces of gain control amount information GB,and first gain control amount information GBL1 (=7) and second gaincontrol amount information GBL1 (=6) are equal to corresponding firstgain control amount information GBR1 (=7) and second gain control amountinformation GBR1 (=6), and thus the encoding flag associated with GBR1is set to 0.

[0603] In a case in which it is determined in step S191 that there is adifference in the number of gain control amount information GB betweengain control amount information GBLi and gain control amount informationGBRi, or there is a difference in value between Nth gain control amountinformation GBLi and corresponding Nth gain control amount informationGBRi, the process jumps to step S193. In step S193, the encoder 91-9sets the encoding flag associated with the gain control number GBRi to1.

[0604] For example, in the case of gain control amount information GBL5and gain control amount information GBR5 in the example shown in FIG.64, there is a difference in value between (first) gain control amountinformation GBL5 (=6) and (first) gain control amount information GBR5(=5), and thus, the encoding flag associated with the gain controlamount information GBR5 is set to 1.

[0605] In the next step S194, the encoder 91-9 encodes the gain controlamount information GBRi in a similar manner as with, for example, theencoder 91-8.

[0606] More specifically, the encoder 91-9 calculates the differencevalue WB1 by subtracting gain control amount information GBLi from thedetected gain control amount information GBRi, and the encoder 91-9retrieves a code corresponding to the calculated difference value WB1from a table similar to that shown in FIG. 63 and employs the retrievedcode as the code for the gain control amount information GBRi.

[0607] For example, in the case of gain control amount information GBR5in the example shown in FIG. 64, the difference value WB1 thereof is −1(=gain control amount information GBR5 (=5−gain control amountinformation GBL5 (=6)), and thus a 3-bit code “101” is employed as thecode of the gain control amount information GBR5.

[0608] In the case in which an encoding flag has been set to 0 in stepS192 or in the case in which gain control amount information GBRi hasbeen encoded in step S194, the process proceeds to step S195. In stepS195, the encoder 91-9 determines whether all encoding flags have beenset to 0 or 1 and gain control amount information GBRi corresponding toan encoding flag set to 1 has been encoded, that is, the encoder 91-9determines whether gain control amount information GBR0 to GB11 have allbeen encoded. If it is determined that all pieces of gain control amountinformation GBRi have not been encoded, the process returns to step S191to perform the step S191 and following steps to encode next unencodedgain control amount information GBRi.

[0609] If it is determined in step S195 that all gain control amountinformation GBR0 to GBR11 have been encoded, the process proceeds tostep S196. In step S196, the encoder 91-9 outputs the encoding flag setto 0 or 1 and the codes to the terminal connected to the switch 93.

[0610] In the next step S197, the encoder 91-9 calculates the sum of thenumbers of bits of the encoded gain control numbers GBR0 to GBR11 andoutputs the calculated sum to the decision unit 92.

[0611] For example, in the case of 18 pieces of gain control amountinformation GBR shown in FIG. 64, 12 1-bit encoding flags and codes withnumber of bits such as those shown in FIG. 64 are generated as a resultof encoding of the 18 pieces of gain control amount information GBR, andthus a signal indicating that the total number of bits is equal to 20(=12+8) is output to the decision unit 92.

[0612] If the conventional fixed-length (4-bit) encoding method wereemployed, the gain control amount information GBR in the example shownin FIG. 64 would be encoded into codes with a total of 72 (=4×18) bits.Thus, the total number of bits of encoded data according to the presentinvention is smaller by 52 than that according to the conventionaltechnique.

[0613] Although in the example described above, when there is adifference in the number of gain control amount information GB betweengain control amount information GBLi and gain control amount informationGBRi, or when there is a difference in value between Nth gain controlamount information GBLi and corresponding Nth gain control amountinformation GBRi, encoding of gain control amount information GBRi isperformed in a similar manner as with the encoder 91-8, the encoding maybe performed according to another method.

[0614] The encoding method employed by the encoder 91-10 is described.

[0615] In some cases, in the stereo audio signal, as shown in FIG. 66,all gain control amount information GBL0 to GBL11 of the left-channelsignal become equal to corresponding gain control amount informationGBR0 to GBR11 of the right-channel signal.

[0616] In view of the above, the encoder 91-10 encodes either gaincontrol amount information GBL0 to GBL11 or gain control amountinformation GBR0 to GBR11 into codes with a fixed bit length, but, whengain control amount information GBL0 to GBL11 are all equal tocorresponding gain control amount information GBR0 to GBR11, encoding isnot performed for the other set of gain control amount information.

[0617] In the case in which gain control amount information GBL isencoded into codes with a fixed bit length, coding of gain controlamount information GBR is performed in a manner described below withreference to a flow chart shown in FIG. 67.

[0618] In step S201, the encoder 91-10 detects gain control amountinformation GBL0 to GBL11 and gain control amount information GBR0 toGBR11 from the input gain control information GL0 to GL11 of theleft-channel signal and gain control information GR0 to GR11 of theright-channel signal, respectively. The encoder 91-10 then determineswhether the gain control amount information GBL0 to GBL11 and the gaincontrol amount information GBR0 to GBR11 are equal to each other betweencorresponding counterparts. If it is determined that they are all equalto each other as is the case in the example shown in FIG. 66, theprocess proceeds to step S202.

[0619] In step S202, the encoder 91-10 does not encode the gain controlamount information GBR0 to GBR11, but the encoder 91-10 outputs a valueof 0 indicating the number of codes to the decision unit 92.

[0620] In a case in which it is determined in step S201 that the gaincontrol amount information GBL0 to GBL11 and the gain control amountinformation GBR0 to GBR11 are not all equal to each other betweencorresponding counterparts, the process proceeds to step S203. In stepS203, the encoder 91-10 encodes the gain control amount information GBR0to GBR11, for example, into codes with a fixed bit length (4 bits).

[0621] In the next step S204, the encoder 91-10 outputs the resultantcodes of the respective gain control amount information GBR0 to GBR11 tothe terminal connected to the switch 93.

[0622] In step S205, the encoder 91-10 calculates the sum of the numbersof bits of the encoded gain control amount information GBR0 to GBR11 andoutputs the calculated sum to the decision unit 92.

[0623] In the example shown in FIG. 66, the total number of bits of thecodes of the gain control amount information GBR is equal to 104(=4×26). Thus, a signal indicating that the total number of bits isequal to 104 is supplied to the decision unit 92.

[0624] If the conventional fixed-length (4-bit) encoding method wereemployed, the gain control amount information GBR in the example shownin FIG. 66 would be encoded into codes with a total of 104 (=4×26) bits.Thus, when the gain control amount information GBR is not encoded, thetotal number of bits of encoded data according to the present inventionis smaller by 104 than that according to the conventional technique.

[0625] The encoding method employed by the encoder 91-11 is described.

[0626] As described earlier with reference to FIG. 41, in plural piecesof gain control amount information GBi, the difference value VB1obtained by subtracting the Nth gain control amount information GBi fromthe (N+1)th gain control amount information GBi has a high probabilityof becoming equal to a particular value.

[0627] Furthermore, in the case of stereo audio signals, as describedearlier with reference to FIG. 60, the difference value WB1 obtained bysubtracting gain control amount information GBLi from gain controlamount information GBRi in the same frequency band has a highprobability of becoming equal to a particular value.

[0628] Therefore, the difference value WB2 obtained by subtracting thedifference value VB1 of the gain control amount information GBLi fromthe difference value VB1 of the gain control amount information GBRi hasa high probability of becoming equal to a particular value (0 or a valuewhose absolute value is close to 0) as shown in FIG. 68.

[0629] In view of the above, the encoder 91-11 encodes gain controlamount information GB such that either gain control amount informationGBL0 to GAL11 or gain control amount information GBR0 to GBR11 areencoded and codes with small numbers of bits are assigned to differencevalues WB2 having high occurrence probabilities.

[0630] The operation of the encoder 91-11 is described below withreference to a flow chart shown in FIG. 69. Herein, it is assumed thatthe encoder 91-11 encodes gain control amount information GBR.

[0631] In step S211, the encoder 91-11 detects gain control amountinformation GBLi in one frequency band from gain control information GL0to GL11 of the input left-channel signal and also detects gain controlamount information GBRi in the same frequency band from gain controlinformation GR0 to GR11 of the input right-channel signal.

[0632] Furthermore, the encoder 91-11 calculates the difference valueVB1 of (N+1)th gain control amount information GBLi by subtracting Nthgain control amount information GBLi from the (N+1)th gain controlamount information GBLi, and also calculates the difference value VB1 of(N+1)th gain control amount information GBRi by subtracting Nth gaincontrol amount information GBRi from the (N+1)th gain control amountinformation GBRi.

[0633] The difference value VB1 of first gain control amount informationGBLi is defined as being equal to the value of the first gain controlamount information GBLi, and the difference value VB1 of first gaincontrol amount information GBRi is defined as being equal to the valueof the first gain control amount information GBRi.

[0634] For example, in the case of gain control amount information GBL3of gain control amount information GBL0 to GBL11 shown in FIG. 70, thedifference value VB1 of first gain control amount information GBL3 isgiven by the same value (=5, not shown) as that of the first gaincontrol amount information GBL3 (=5), and the difference value VB1 ofsecond gain control amount information GBL3 is given by a value (=−3)obtained by subtracting first gain control amount information GBL3 (=5)from the second gain control amount information GBL3 (=2).

[0635] Furthermore, in the case of gain control amount information GBR3of gain control amount information GBR0 to GBR11, the difference valueVB1 of first gain control amount information GBR3 is given by the samevalue (=4, not shown) as that of the first gain control amountinformation GBR3 (=4), and the difference value VB1 of second gaincontrol amount information GBL3 is given by a value (=−2) obtained bysubtracting first gain control amount information GBR3 (=4) from thesecond gain control amount information GBR3 (=2).

[0636] In the next step S212, the encoder 91-11 determines thedifference value WB2 by subtracting the difference value VB1 of the gaincontrol amount information GBLi from the difference value VB1 of thegain control amount information GBRi.

[0637] Hereinafter, for simplicity, the difference value WB2 obtained bysubtracting the difference value VB1 of the gain control amountinformation GBLi from the difference value VB1 of the gain controlamount information GBRi will be referred to simply as the differencevalue WB2 of the gain control amount information GBRi.

[0638] For example, in the case of gain control amount information GBL3and gain control amount information GBR3 in the example shown in FIG.70, the difference value WB2 of first gain control amount informationGBR3 is given by a value (=−1) obtained by subtracting the differencevalue VB1 (=5) of first gain control amount information GBL3 from thedifference value VB1 (=4) of the first gain control amount informationGBR3, and the difference value WB2 of second gain control amountinformation GBR3 is given by a value (=1) obtained by subtracting thedifference value VB1 (=−3) of second gain control amount informationGBL3 from the difference value VB1 (=−2) of the second gain controlamount information GBR3.

[0639] In step S213, the encoder 91-11 retrieves a code corresponding toa value equal to the difference value VB2 of the gain control amountinformation GBRi from a table shown in FIG. 71 and employs the retrievedcode as the code for the gain control amount information GBRi.

[0640] For example, in the case of gain control amount information GBR3in the example shown in FIG. 70, the difference value WB2 of first gaincontrol amount information GBRL3 (=4) is −1, and thus a 2-bit code “10”is employed as the code of the first gain control amount informationGBRL3. On the other hand, a 3-bit code “111” is employed for the secondgain control amount information GBR3 (=2) because the difference valueWB2 of the second gain control amount information GBR3 is 1.

[0641] In the table shown in FIG. 71, a 4-bit code “1100” is assigned toa value −2, a 3-bit code “10” is assigned to a value −1, a 1-bit code“0” to a value 0, and a 3-bit code “110” to a value 1.

[0642] Furthermore, in the table shown in FIG. 71, a procedure ofdetermining a code for a value other than the values of −2 to 1 isdefined (more specifically, the code is given by a formula 1111+originalvalue). According to this procedure, an 8-bit code is given by acombination of a 4-bit code “1111” (escape code) and a following 4-bitcode indicating the gain control amount information GB (original value,the gain control amount information GBR in this specific case).

[0643] In the next step S214, the encoder 91-11 determines whether codeshave been determined for all gain control amount information GBR0 toGBR11, that is, whether all gain control amount information GBR0 toGBR11 have been encoded. If it is determined that all pieces of gaincontrol amount information GBRi have not been encoded, the processreturns to step S211 to perform the step S211 and following steps toencode next unencoded gain control amount information GBRi.

[0644] If it is determined in step S214 that all gain control amountinformation GBR0 to GBR11 have been encoded, the process proceeds tostep S215. In step S215, the encoder 91-11 outputs the codes determinedin step S213 for the respective gain control amount information GBR0 toGBR11 to the terminal connected to the switch 93.

[0645] In step S216, the encoder 91-11 calculates the sum of the numbersof bits of the encoded gain control numbers GBR0 to GBR11 and outputsthe calculated sum to the decision unit 92.

[0646] For example, in the case of 29 pieces of gain control amountinformation shown in FIG. 70, codes with numbers of bits as shown inFIG. 70 are generated as a result of encoding, and thus a signalindicating that the total number of bits is equal to 37 is output to thedecision unit 92.

[0647] If the conventional fixed-length (4-bit) encoding method wereemployed, the gain control amount information GBR in the example shownin FIG. 70 would be encoded into codes with a total of 116 (=4×29) bits.Thus, the total number of bits of encoded data according to the presentinvention is smaller by 79 than that according to the conventionaltechnique.

[0648] Although in the coding table (FIG. 71) used in the presentexample, escape codes are used for some values, specific codes includingno escape code may be assigned to all respective values.

[0649] In the present example, the difference value WB2 is assumed tohave such a characteristic shown in FIG. 68. In a case in which thecharacteristic of the difference value WB2 varies from one encoding unitAi to another, the coding table may be switched depending on thecharacteristic of the difference value WB2.

[0650] The encoding method employed by the encoder 91-12 is described.

[0651] As described earlier with reference to FIG. 44, the differencevalue VB2 obtained by subtracting gain control amount information GBi-1of a lower frequency band immediately adjacent to the frequency band ofgain control amount information GBi from the gain control amountinformation GBi has a high probability of becoming equal to a particularvalue.

[0652] Furthermore, in the case of stereo audio signals, as describedearlier with reference to FIG. 60, the difference value WB1 obtained bysubtracting gain control amount information GBRi from gain controlamount information GBLi in the same frequency band has a highprobability of becoming equal to a particular value.

[0653] Therefore, for example, the difference value WB3 obtained bysubtracting the difference value VB2 of the gain control amountinformation GBLi from the difference value VB2 of the gain controlamount information GBRi has a high probability of becoming equal to aparticular value (0 or a value whose absolute value is close to 0 s) asshown in FIG. 72.

[0654] In view of the above, the encoder 91-12 encodes gain controlamount information GB such that either gain control amount informationGBL0 to GBL11 or gain control amount information GBR0 to GBR11 areencoded, and codes with small numbers of bits are assigned to differencevalues WB3 having high occurrence probabilities.

[0655] The operation of the encoder 91-12 is described below withreference to a flow chart shown in FIG. 73. Herein, it is assumed thatthe encoder 91-8 encodes gain control amount information GBR.

[0656] In step S221, the encoder 91-12 detects gain control amountinformation GBLi in one frequency band from gain control information GL0to GL11 of the input left-channel signal and also detects gain controlamount information GBRi in the same frequency band from gain controlinformation GR0 to GR11 of the input right-channel signal.

[0657] The encoder 91-12 determines the difference value VB2 of the gaincontrol amount information GBLi by subtracting, from the gain controlamount information GBLi, the gain control amount information GBLi-1 ofan encoding unit Ai-1 which is in a lower frequency band adjacent to thefrequency band of the encoding unit Ai and which was detected inprevious execution of step S221.

[0658] The encoder 91-12 also determines the difference value VB2 of thegain control amount information GBRi by subtracting the gain controlamount information GBRi-1, which was detected in previous execution ofstep S221, from the gain control amount information GBRi.

[0659] For example, in the case of gain control amount information GBL3of gain control amount information GBL0 to GBL11 shown in FIG. 74, thedifference value VB2 of first gain control amount information GBL3 (=5)is given by a value (=−1) obtained by subtracting first gain controlamount information GBL2 (=6) from the first gain control amountinformation GBL3 (=5), and the difference value VB2 of second gaincontrol amount information GBL3 (=2) is given by a value (=−3, notshown) obtained by subtracting second gain control amount informationGBL2 (=5) from the second gain control amount information GBL3 (=2).

[0660] Furthermore, in the case of gain control amount information GBR3of gain control amount information GBR0 to GBR11 shown in FIG. 74, thedifference value VB2 of first gain control amount information GBR3 (=4)is given by a value (=−2, not shown) obtained by subtracting first gaincontrol amount information GBR2 (=6) from the first gain control amountinformation GBR3 (=4), and the difference value VB2 of second gaincontrol amount information GBR3 (=2) is given by a value (=−3, notshown) obtained by subtracting second gain control amount informationGBR2 (=5) from the second gain control amount information GBR3 (=2).

[0661] In the next step S222, the encoder 91-12 determines thedifference value WB3 by subtracting the difference value VB2 of the gaincontrol amount information GBLi from the difference value VB2 of thegain control amount information GBRi.

[0662] Hereinafter, for simplicity, the difference value VB3 obtained bysubtracting the difference value VB3 of the gain control amountinformation GBLi from the difference value VB2 of the gain controlamount information GBRi will be referred to simply as the differencevalue WB3 of the gain control amount information GBRi.

[0663] For example, in the case of gain control amount information GBL3and gain control amount information GBR3 in the example shown in FIG.74, the difference value WB3 of first gain control amount informationGBR3 is given by a value (=1) obtained by subtracting the differencevalue VB2 (=−1) of first gain control amount information GB3 from thedifference value VB2 (=−2) of the first gain control amount informationGBR3, and the difference value WB3 of second gain control amountinformation GBR3 is given by a value (=0) obtained by subtracting thedifference value VB3 (=−3) of second gain control amount informationGBL3 from the difference value VB2 (=−3) of the second gain controlamount information GBR3.

[0664] In step S223, the encoder 91-12 retrieves a code corresponding toa value equal to the difference value WB3 calculated in step S222 from atable shown in FIG. 75 and employs the retrieved code as the code forthe gain control amount information GBRi.

[0665] For example, in the case of gain control amount information GBR3in the example shown in FIG. 74, the difference value WB3 of first gaincontrol amount information GGR3 (=4) is −1, and thus a 3-bit code “101”is employed as the code of the first gain control amount informationGGR3, and a 1-bit code “0” is employed for second gain control amountinformation GGR3 (=2) because the difference value WB3 of the secondgain control amount information GGR3 is 0.

[0666] In the table shown in FIG. 75, a 3-bit code “100” is assigned toa value −2, a 3-bit code “101” to a value −1, a 1-bit code “0” to avalue 0, and a 3-bit code “110” to 1.

[0667] Furthermore, in the table shown in FIG. 75, a procedure ofdetermining a code for a value other than the values of −2 to 1 isdefined (more specifically, the code is given by a formula 111+originalvalue). According to this procedure, a 7-bit code is given by acombination of a 3-bit code “111” and a following 4-bit code indicatingthe gain control amount information GB (original value, the gain controlamount information GBR in this specific case).

[0668] In the next step S224, the encoder 91-12 determines whether codeshave been determined for all gain control amount information GBR0 toGBR11, that is, whether all gain control amount information GBR0 toGBR11 have been encoded. If it is determined that all pieces of gaincontrol amount information GBRi have not been encoded, the processreturns to step S221 to perform the step S221 and following steps toencode next unencoded gain control amount information GBRi.

[0669] If it is determined in step S224 that all gain control amountinformation GBR0 to GBR11 have been encoded, the process proceeds tostep S225. In step S225, the encoder 91-12 outputs the codes determinedin step S223 for the respective gain control amount information GBR0 toGBR11 to the terminal connected to the switch 93.

[0670] In step S226, the encoder 91-12 calculates the sum of the numbersof bits of the encoded gain control numbers GBR0 to GBR11 and outputsthe calculated sum to the decision unit 92.

[0671] For example, in the case of 29 pieces of gain control amountinformation GBR shown in FIG. 74, codes with numbers of bits as shown inFIG. 74 are generated as a result of encoding, and thus a signalindicating that the total number of bits is equal to 46 is output to thedecision unit 92.

[0672] If the conventional fixed-length (4-bit) encoding method wereemployed, the gain control amount information GBR in the example shownin FIG. 74 would be encoded into codes with a total of 116 (=4×29) bits.Thus, in this example, the total number of bits of encoded dataaccording to the present invention is smaller by 70 than that accordingto the conventional technique.

[0673] Although in the coding table (FIG. 75) used in the presentexample, escape codes are used for some values, specific codes includingno escape code may be assigned to all respective values.

[0674] In the present example, the difference value WB2 is assumed tohave such a characteristic shown in FIG. 72. In a case in which thecharacteristic of the difference value WB3 varies from one encoding unitAi to another, the coding table may be switched depending on thecharacteristic of the difference value WB3.

[0675] In addition to above-described various methods employed by thegain control amount information encoder 72 to encode the gain controlamount information, there may be provided an additional encoder forencoding the gain control number into a code with a fixed bit lengthaccording to the conventional technique.

[0676] Now, the gain control position information encoder 73 (FIG. 8) ofthe gain control information encoder 61 is described. FIG. 76 shows anexample of a construction of the gain control position informationencoder 73.

[0677] Gain control information G0 to G11 output from the spectrumconverters 12-1 to 12-12 are input to each of 12 encoders 101-1 to101-12.

[0678] The encoders 101-1 to 101-12 detect gain control positioninformation GC0 to GC11 from the respective input gain controlinformation G0 to G11 and encode the detected gain control positioninformation GC0 to GC11 by means of predetermined encoding methods.Resultant encoded data are output to terminals connected to switch 103.In the present example, gain control position information GC takes oneof values from 0 to 31 serving as an index indicating a gain controlposition.

[0679] Each of the encoders 101-1 to 101-12 calculates the sum of thenumbers of bits of the encoded gain control numbers GC0 to GC11 andoutputs the calculated sum to the decision unit 102.

[0680] The decision unit 102 detects, among encoders 101-1 to 101-12, anencoder 101 which has output a smallest sum, that is, an encoder 101which has encoded the gain control numbers GC0 to GC11 into a smallesttotal number of bits, and the decision unit 102 controls the switch 103so that the encoded gain control numbers GC0 to GC11 encoded by thedetected encoder 101 are output to the multiplexer 16. The decision unit102 outputs information indicating the encoding method employed by thedetected encoder 101 to the multiplexer 16. The decision unit 102 storesinformation indicating the encoding methods employed by the respectiveencoders 101.

[0681] The encoding methods employed by the respective encoders 101-1 to101-12 are described.

[0682] First, the encoding method employed by the encoder 101-1 isdescribed below with reference to a flow chart shown in FIG. 77.

[0683] In step S231, the encoder 101-1 detects gain control positioninformation GCi (i=0, 1, 2, . . . , 11) from the input gain controlinformation G0 to G11.

[0684] In the next step S232, the encoder 101-1 determines a code to beassigned to first gain control position information GCi of the pluralpieces of gain control position information GCi detected in step S231.More specifically, the encoder 101-1 expresses the first gain controlposition information GCi using 5 bits, and employs that 5-bit expressionas the code of the first gain control position information GCi.

[0685] For example, in the case of gain control position information GC0of gain control position information GC0 to GC11 shown in FIG. 79, firstgain control position information GC0 (=9) is expressed using 5 bits andthe resultant 5-bit expression is employed as the code of the first gaincontrol position information GC0.

[0686] In step S233, the encoder 101-1 determines codes for second andfollowing gain control position information GCi of the plural pieces ofgain control position information GCi detected in step S231. The detailsof the process in step S233 are shown in a flow chart of FIG. 78.

[0687] Herein, we denote the second gain control position informationGCi and following gain control position information GCi, to be encoded,by (N+1) th gain control position information GCi (where N=1, 2, . . .). In step S241, the encoder 101-1 determines whether Nth gain controlposition information GCi is smaller than 15. In the case in which it isdetermined that the Nth gain control position information GCi is smallerthan 15, that is, in the case in which the Nth gain control positioninformation GCi has a value in the range from 0 to 14, the processproceeds to step S242. In step S242, the encoder 101-1 expresses the(N+1)th gain control position information GCi using 5 bits, and theresultant expression in 5 bits is employed as the code of the (N+1)thgain control position information GCi.

[0688] In the case in which it is determined in step S241 that the Nthgain control position information GCi is not smaller than 15, that is,in the case in which the Nth gain control position information GCi has avalue in the range from 15 to 31, the process proceeds to step S243. Instep S243, the encoder 101-1 determines whether the Nth gain controlposition information GCi is equal to or greater than 15 but smaller than23. If it is determined that the Nth gain control position informationGCi is equal to or greater than 15 but smaller than 23, that is, in thecase in which the Nth gain control position information GCi has a valuein the range from 15 to 22, the process proceeds to step S244.

[0689] In step S244, the encoder 101-1 subtracts 16 from the (N+1)thgain control position information GCi and expresses the result using 4bits. The resultant 4-bit expression is employed as the code of the(N+1)th gain control position information GCi.

[0690] When the Nth gain control position information GCi has a value inthe range from 15 to 22, the (N+1)th gain control position informationGCi must have a value in the range from 16 to 31. Therefore, if 16 issubtracted from the (N+1)th gain control position information GCi, theresult becomes equal to or smaller than 15 and thus the resultant valuecan be expressed using 4 bits. Thus, the encoder 101-1 determines a4-bit expression of the value obtained by subtracting 16 from the(N+1)th gain control position information GCi and employs the resultant4-bit expression as the code of the (N+1)th gain control positioninformation GCi.

[0691] In the case in which it is determined in step S243 that the Nthgain control position information GCi is not within the range from 15 to23 (boundary value 23 is not included in the range), that is, in thecase in which the Nth gain control position information GCi has a valuein the range from 23 to 31, the process proceeds to step S245. In stepS245, the encoder 101-1 determines whether the Nth gain control positioninformation GCi is equal to or greater than 23 but smaller than 27.

[0692] If it is determined in step S245 that the Nth gain controlposition information GCi is equal to or greater than 23 but smaller than27, that is, in the case in which the Nth gain control positioninformation GCi has a value in the range from 23 to 26, the processproceeds to step S246. In step S246, the encoder 101-1 subtracts 24 fromthe (N+1)th gain control position information GCi and expresses theresult using 3 bits. The resultant 3-bit expression is employed as thecode of the (N+1)th gain control position information GCi.

[0693] When the Nth gain control position information GCi has a value inthe range from 23 to 26, the (N+1)th gain control position informationGCi must have a value in the range from 24 to 31. Therefore, if 24 issubtracted from the (N+1)th gain control position information GCi, theresult becomes equal to or smaller than 7 and thus the resultant valuecan be expressed using 3 bits. Thus, the encoder 101-1 determines a3-bit expression of the value obtained by subtracting 24 from the(N+1)th gain control position information GCi and employs the resultant3-bit expression as the code of the (N+1)th gain control positioninformation GCi.

[0694] For example, in the case of gain control position information GC3in the example shown in FIG. 79, first gain control position informationGC3 (=26) is within the range from 23 to 27 (boundary value 27 is notincluded in the range), and thus 3-bit data representing the value (=4)obtained by subtracting 24 from second gain control position informationGC3 (=28) is employed as the code of the second gain control positioninformation GC3 (=28).

[0695] If it is determined in step S245 that the Nth gain controlposition information GCi is not within the range from 23 to 27 (boundaryvalue 27 is not included in the range), that is, in the case in whichthe Nth gain control position information GCi has a value in the rangefrom 27 to 31, the process proceeds to step S247. In step S247, theencoder 101-1 determines whether the Nth gain control positioninformation GCi is equal to or greater than 27 but smaller than 29.

[0696] If it is determined in step S247 that the Nth gain controlposition information GCi is equal to or greater than 27 but smaller than29, that is, in the case in which the Nth gain control positioninformation GCi is equal to 27 or 28, the process proceeds to step S248.In step S248, the encoder 101-1 subtracts 28 from the (N+1)th gaincontrol position information GCi and expresses the result using 2 bits.The resultant 2-bit expression is employed as the code of the (N+1)thgain control position information GCi.

[0697] When the Nth gain control position information GCi has a valueequal to 27 or 28, the (N+1)th gain control position information GCimust have a value in the range from 28 to 31. Therefore, if 28 issubtracted from the (N+1)th gain control position information GCi, theresult becomes equal to or smaller than 3 and thus the resultant valuecan be expressed using 2 bits. Thus, the encoder 101-1 determines a2-bit expression of the value obtained by subtracting 28 from the(N+1)th gain control position information GCi and employs the resultant2-bit expression as the code of the (N+1)th gain control positioninformation GCi.

[0698] For example, in the case of gain control position information GC7in the example shown in FIG. 79, second gain control positioninformation GC7 (=27) is within the range from 27 to 29 (boundary value29 is not included in the range), and thus 2-bit data representing thevalue (=1) obtained by subtracting 28 from third gain control positioninformation GC7 (=29) is employed as the code of the third gain controlposition information GC7 (=29). If it is determined in step S247 thatthe Nth gain control position information GCi is not within the rangefrom 27 to 29 (boundary value 29 is not included in the range), that is,in the case in which the Nth gain control position information GCi has avalue in the range from 29 to 31, the process proceeds to step S249. Instep S249, the encoder 101-1 determines whether the Nth gain controlposition information GCi is equal to 29.

[0699] If it is determined in step S249 that the Nth gain controlposition information GCi is equal to 29, the process proceeds to stepS250. In step S250, the encoder 101-1 subtracts 30 from the (N+1)th gaincontrol position information GCi and expresses the result using 1 bit.The resultant 1-bit expression is employed as the code of the (N+1)thgain control position information GCi.

[0700] When the Nth gain control position information GCi has a valueequal to 29, the (N+1)th gain control position information GCi must havea value equal to 30 or 31. Therefore, if 30 is subtracted from the(N+1)th gain control position information GCi, the result becomes equalto or smaller than 1 and thus the resultant value can be expressed using1 bit. Thus, the encoder 101-1 determines a 1-bit expression of thevalue obtained by subtracting 30 from the (N+1)th gain control positioninformation GCi and employs the resultant 1-bit expression as the codeof the (N+1)th gain control position information GCi.

[0701] For example, in the case of gain control position informationGC10 in the example shown in FIG. 79, second gain control positioninformation GC10 has value equal to 29, and thus 1-bit data representingthe value (=0) obtained by subtracting 30 from third gain controlposition information GC10 (=30) is employed as the code of the thirdgain control position information GC3 (=30).

[0702] If it is determined in step S249 that the Nth gain controlposition information GCi is not equal to 29, that is, in the case inwhich the Nth gain control position information GCi has a value equal to30 or 31, the process proceeds to step S251. In step S251, the encoder101-1 encodes the (N+1)th gain control position information GCi into a0-bit code. That is, in practice, encoding of the (N+1)th gain controlposition information GCi is not performed.

[0703] When the value of the Nth gain control position information GCiis equal to 30, the (N+1)th gain control position information must havea value equal to 31. Therefore, when the value of the Nth gain controlposition information GCi is detected to be equal to 30, it can beconcluded that the (N+1)th gain control position information GCi has avalue equal to 31. When the value of the Nth gain control positioninformation GCi is equal to 31, there is no (N+1)th gain controlposition information GCi. Therefore, when the value of the Nth gaincontrol position information GCi is equal to 30 or 31, the encoder 101-1does not perform encoding on the (N+1)th gain control positioninformation GCi.

[0704] If the (N+1)th gain control position information GCi has beenencoded in step S242, step S244, step S246, step S248, step S250, orstep S251, the process proceeds to step S252. In step S252, the encoder101-1 determines whether encoding is completed for second gain controlposition information GCi and following all pieces of gain controlposition information GCi of the gain control position information GCidetected in step S231. If it is determined that there is one or morepieces of gain control position information GCi which have not yet beenencoded, the process returns to step S241 to perform the above-describedprocess on next (N+1)th gain control position information GCi which hasnot yet been encoded.

[0705] On the other hand, if it is determined in step S252 that encodingis completed for second gain control position information GCi andfollowing all pieces of gain control position information GCi of thegain control position information GCi detected in step S231, the flowexits the present process and proceeds to step S234 shown in FIG. 77.

[0706] In step S234, the encoder 101-1 determines whether all gaincontrol position information GC0 to GC11 have been encoded. If it isdetermined that all pieces of gain control position information GC havenot been encoded, the process returns to step S231 to perform the stepS231 and following steps to encode next unencoded gain control positioninformation GCi.

[0707] If it is determined in step S234 that all gain control positioninformation GC0 to GC11 have been encoded, the process proceeds to stepS235. In step S235, the encoder 101-1 outputs the codes determined instep S232 or S233 for the respective gain control position informationGC0 to GC11 to the terminal connected to the switch 103.

[0708] In the next step S236, the encoder 101-1 calculates the sum ofthe numbers of bits of the encoded gain control position information GC0to GC11 and outputs the calculated sum to the decision unit 102.

[0709] For example, in the case of 24 pieces of gain control positioninformation GC shown in FIG. 79, codes with numbers of bits such asthose shown in FIG. 79 are produced as a result of the encoding, andthus a signal indicating that the total number of bits is equal to 90 isoutput to the decision unit 102.

[0710] If the conventional fixed-length (5-bit) encoding method wereemployed, the gain control position information GC in the example shownin FIG. 79 would be encoded into codes with a total of 120 (=5×24) bits.Thus, the total number of bits of encoded data according to the presentinvention is smaller by 30 than that according to the conventionaltechnique.

[0711] The encoding method employed by the encoder 101-2 is described.

[0712] Gain control position information GC indicates the position of anattack portion AT or a release portion RE (more precisely, informationcorresponding to an index indicated by gain control position informationGC indicates the position of an attack portion AT or a release portionRE). The gain control position information GC indicating the position ofrelease portions RE has high probabilities of having particular values(1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, and 29) asrepresented by broken lines in FIG. 80.

[0713] In view of the above, the encoder 101-2 encodes gain controlposition information GC (gain control position information GC indicatingthe position of a release portion RE, in the case of the example shownin FIG. 80) in such a manner that codes with small numbers of bits areassigned to values of gain control position information GC having highoccurrence probabilities.

[0714] The operation of the encoder 101-2 is described below withreference to a flow chart shown in FIG. 81. In step S261, the encoder101-2 detects gain control position information GCi of one frequencyband from the input gain control information G0 to G11.

[0715] In the next step S262, the encoder 101-2 determines a code to beassigned to the gain control position information GCi. In a case inwhich there are plural pieces of gain control position information GCi,the encoder 101-2 determines a code for each of the plural pieces ofgain control position information GCi (first gain control positioninformation GCi, second gain control position information GCi, . . . ).The details of the process in step S262 are shown in the form of a flowchart in FIG. 82.

[0716] That is, in step S271, the encoder 101-2 determines whether thedetected gain control position information GCi indicates the position ofan attack portion AT or a release portion RE.

[0717] More specifically, the encoder 101-2 detects Nth gain controlamount information GBi corresponding to an Nth gain control positioninformation GCi to be encoded and also (N+1)th gain control amountinformation GBi from input gain control information G0 to G11 andcalculates the difference value between the Nth gain control amountinformation GBi and (N+1)th gain control amount information GBi. If thecalculated difference value is positive, the encoder 101-2 determinesthat the Nth gain control position information GCi indicates theposition of an attack portion AT. However, if the calculated differencevalue is negative, the encoder 101-2 determines that the Nth gaincontrol position information GCi indicates the position of a releaseportion RE.

[0718] For example, in the case of gain control position information GC1of gain control position information GC0 to GC11 shown in FIG. 84, firstgain control position information GC1 (=4) and second gain controlposition information GC1 (=5) are detected as indicating the positionsof attack portions AT (in FIG. 84, superscript “A” denotes that gaincontrol position information GC indicates the position of an attackportion AT, and a similar notation is also used elsewhere), while thirdgain control position information GC1 (=13) is detected as indicatingthe positions of a release portion RE (in FIG. 84, superscript “R”denotes that gain control position information GC indicates the positionof a release portion RE, a similar notation is also used elsewhere).

[0719] In the next step S272, the encoder 101-2 determines a code to beassigned to the gain control position information GCi depending onwhether the gain control position information GCi indicates the positionof an attack portion AT or a release portion RE.

[0720] More specifically, if the encoder 101-2 determines that gaincontrol position information GCi indicates the position of a releaseportion RE, the encoder 101-2 retrieves a code corresponding to a valueequal to the value of that gain control position information GCi fromthe table shown in FIG. 83 and employs the retrieved code as the code ofthe gain control position information GCi.

[0721] For example, in the case of third gain control positioninformation GC1 (=13) of gain control position information GC1, thethird gain control position information GC1 indicates the position of arelease portion RE and thus a 4-bit code “0110” assigned to a value of13 in the table shown in FIG. 83 is employed as the code of the thirdgain control position information GC1.

[0722] In the table shown in FIG. 83, 4-bit codes are assigned torespective values of 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27,and 29, and a 5-bit code is assigned to a value of 31. That is, if theencoder 101-2 determines that Nth gain control position information GCihas a value equal to one of those values, the encoder 101-2 employs acode corresponding to the value as the code of the Nth gain controlposition information GCi.

[0723] Furthermore, in the table shown in FIG. 83, a procedure ofdetermining a code for a value other than 1, 3, 5, 7, 9, 11, 13, 15, 17,19, 21, 23, 25, 27, 29, and 31 is defined (more specifically, the codeis given by a formula 11111+original value). According to thisprocedure, a 10-bit code is given by a combination of a 5-bit code“11111” (escape code) and a following 5-bit code indicating the Nth gaincontrol position information GCi. That is, in the case in which the Nthgain control position information GCi has a value other than 1, 3, 5, 7,9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, and 31, the encoder 101-2determines a 10-bit code via the above process and employs it as thecode for the Nth gain control position information GCi.

[0724] On the other hand, if it is determined that the gain controlposition information GCi indicates the position of an attack portion AT,the encoder 101-2 expresses the gain control position information GCiusing 5 bits and employs the resultant 5-bit expression as the code ofthe gain control position information GCi.

[0725] For example, in the case of gain control position information GC1in the example shown in FIG. 84, second gain control positioninformation GC1 (=5) indicates the position of an attack portion AT, andthus 5-bit data representing the second gain control positioninformation GC1 is employed as the code of the second gain controlposition information GC1.

[0726] If the code of the gain control position information GCi has beendetermined (in the case in which there are plural pieces of gain controlposition information GCi, codes are determined for respective pluralpieces of gain control position information GCi), the process proceedsto step S263 shown in FIG. 81. In step S263, the encoder 101-2determines whether codes have been determined for all gain controlposition information GC0 to GC11, that is, whether all gain controlposition information GC0 to GC11 have been encoded. If it is determinedthat all pieces of gain control position information GCi have not beenencoded, the process returns to step S261 to perform the step S261 andfollowing steps to encode next unencoded gain control positioninformation GCi.

[0727] If it is determined in step S263 that all gain control positioninformation GC0 to GC11 have been encoded, the process proceeds to stepS264. In step S264, the encoder 101-2 outputs the codes determined instep S272 in FIG. 82 for the respective gain control positioninformation GC0 to GC11 to the terminal connected to the switch 103.

[0728] In the next step S265, the encoder 101-2 calculates the sum ofthe numbers of bits of the encoded gain control position information GC0to GC11 and outputs the calculated sum to the decision unit 102.

[0729] For example, in the case of 18 pieces of gain control positioninformation GC shown in FIG. 84, codes with numbers of bits such asthose shown in FIG. 84 are generated as a result of encoding, and thus asignal indicating that the total number of bits is equal to 85 is outputto the decision unit 102.

[0730] If the conventional fixed-length (5-bit) encoding method wereemployed, the gain control position information GC in the example shownin FIG. 84 would be encoded into codes with a total of 90 (=5×18) bits.Thus, the total number of bits of encoded data according to the presentinvention is smaller by 5 than that according to the conventionaltechnique.

[0731] Although in the present embodiment, the determination of whetherthe Nth gain control position information GCi indicates the position ofan attack portion AT or a release portion RE is made on the basis of thedifference value between the Nth gain control amount information GBicorresponding to the Nth gain control position information GCi and the(N+1)th gain control amount information GBi, the determination may bemade such that information indicating whether gain control positioninformation GC indicates an attack portion AT or a release portion RE isadded to the gain control position information GC and the determinationis made on the basis of that information.

[0732] In the encoding table (FIG. 83) employed in the present example,some values are encoded using escape codes. Alternatively, specificcodes corresponding to respective values may be defined in the table forall values.

[0733] In the present example, the gain control position information GCis assumed to have such a characteristic shown in FIG. 80. In the casein which the characteristic of gain control position information GCvaries from one encoding unit Ai to another, the coding table may beswitched depending on the characteristic of the gain control positioninformation GC. Codes of attack portions AT may be determined using atable, as in the case of release portions RE.

[0734] The encoding method employed by the encoder 101-3 is described.

[0735] In the case in which there are plural pieces of gain controlposition information GCi, the difference value VC1 obtained bysubtracting Nth gain control position information GCi from (N+1)th gaincontrol position information GCi has a high probability of becomingequal to a particular value (for various values of N=1, 2, . . . ) asshown in FIG. 85.

[0736] In the example shown in FIG. 85, the difference value VC1 of gaincontrol position information GC indicating the position of an attackportion AT has a high probability of taking a value of 1 (as representedby a solid line in FIG. 85), while the difference value VC1 of gaincontrol position information GC indicating the position of a releaseportion RE has a high probability of taking a value of 3 (as representedby a dotted line in FIG. 85).

[0737] In view of the above, the encoder 101-3 encodes the gain controlposition information GC in such a manner that codes with small numbersof bits are assigned to difference values VC1 having high occurrenceprobabilities.

[0738] The operation of the encoder 101-3 is described below withreference to a flow chart shown in FIG. 86.

[0739] In step S281, the encoder 101-3 detects gain control positioninformation GCi to be encoded from the input gain control information G0to G11 and determines whether the detected gain control positioninformation GCi indicates the position of an attack portion AT or arelease portion RE in a similar manner to the encoder 101-2.

[0740] For example, in the case of gain control position information GC1of gain control position information GC0 to GC11 shown in FIG. 87, firstgain control position information GC1 (=7) is detected as indicating theposition of an attack portion AT, while second gain control positioninformation GC1 (=17) and third gain control position information GC1(=27) are detected as indicating the positions of release portions RE.

[0741] After determining whether gain control position information GCiindicates the position of an attack portion AT or a release portion, theencoder 101-3 calculates the difference value VC1 by subtracting Nthgain control position information GCi from (N+1)th gain control positioninformation GCi.

[0742] Hereinafter, for simplicity, the difference value VC1 obtained bysubtracting the Nth gain control position information GCi from the(N+1)th gain control position information GCi will be referred to simplyas the difference value VC1 of the (N+1)th gain control positioninformation GCi.

[0743] For example, in the case of gain control position information GC1in the example shown in FIG. 87, the difference value VC1 of second gaincontrol position information GC1 is given by a value (=10, not shown)obtained by subtracting first gain control position information GC1 (=7)from the second gain control position information GC1 (=17), and thedifference value VC1 of third gain control position information GC1 isgiven by a value (=10, not shown) obtained by subtracting the secondgain control position information GC1 (=17) from the third gain controlposition information GC1 (=27).

[0744] In the present example, the difference value VC1 of first gaincontrol position information GCi is defined as being equal to the valueof the first gain control position information GCi. For example, thedifference value VC1 of first gain control position information GC1 ofgain control position information GC1 is defined as being equal to 7(not shown in the figure).

[0745] Referring again to FIG. 86, the encoder 101-3 determines, in stepS282, a code to be assigned to the gain control position informationGCi.

[0746] More specifically, in a case in which the Nth gain controlposition information GCi to be encoded indicates the position of anattack portion AT, the encoder 101-3 retrieves a code corresponding tothe difference value VC1, calculated in step S281, of the Nth gaincontrol position information GCi from a table shown in FIG. 88 andemploys the retrieved code as the code for the Nth gain control positioninformation GCi.

[0747] On the other hand, in a case in which the Nth gain controlposition information GCi indicates the position of a release portion RE,the encoder 101-3 retrieves a code corresponding to the difference valueVC1, calculated in step S281, of the Nth gain control positioninformation GCi from a table shown in FIG. 89 and employs the retrievedcode as the code for the Nth gain control position information GCi.

[0748] For example, in the case of first gain control positioninformation GC1 (=7) of gain control position information GC1 shown inFIG. 87, the first gain control position information GC1 indicates theposition of an attack portion AT and the difference value VC1 is equalto 7, and thus a 5-bit code “111011” is employed as the code of thefirst gain control position information GC1 (=7).

[0749] In the case of second gain control position information GC1 (=17)and third gain control position information GC1 (=27), they indicate thepositions of release portions RE and the difference values VC1 are bothequal to 10 (not shown in the figure), and thus a 5-bit code “11010” isassigned to both the second gain control position information GC1 (=17)and the third gain control position information GC1 (=27).

[0750] In the table shown in FIG. 88, a 1-bit code “0” is assigned to avalue 1, a 3-bit code “100” to a value 2, a 4 bit code “1010” to a value3, a 4-bit code “1011” to a value 4, a 4-bit code “1100” to a value 5, a5-bit code “11010” to a value 6, and a 5-bit code “11011” to a value 7.

[0751] In the table shown in FIG. 88, a procedure of determining a codeof each value in the range from 8 to 15 is defined (1110+gain controlposition information GC-8). According to this procedure, a 7-bit code isgiven which consists of a 4-bit code “1111” (escape code) and afollowing 3-bit code indicating the gain control position informationGC-8. Similarly, a procedure of determining a code of each value in therange from 16 to 31 is also defined (1111+gain control positioninformation GC-16). According to this procedure, an 8-bit code is givenwhich consists of a 4-bit code “1111” (escape code) and a following4-bit code indicating the gain control position information GC-16.

[0752] In the table shown in FIG. 89, a 4-bit code “1010” is assigned toa value 1, a 1-bit code “0” to a value 2, a 3 bit code “100” to a value4, a 4-bit code “1011” to a value 6, a 4-bit code “1100” to a value 8, a5-bit code “11010” is assigned to a value 10, a 6-bit code “110110” to avalue 12, and a 6-bit code “110111” to a value 14.

[0753] Furthermore, in the table shown in FIG. 89, a procedure ofdetermining a code for a value other than 1, 2, 4, 6, 8, 10, 12, and 14is defined (more specifically, the code is given by a formula111+original value). According to this procedure, an 8-bit code is givenas a combination of a 3-bit code “111” (escape code) and a following5-bit code indicating the gain control position information GC (originalvalue).

[0754] In the next step S283, the encoder 101-3 determines whether codeshave been determined for all gain control position information GC0 toGC11, that is, whether all gain control position information GC0 to GC11have been encoded. If it is determined that all pieces of gain controlposition information GCi have not been encoded, the process returns tostep S281 to perform the step S281 and following steps to encode nextunencoded gain control position information GCi.

[0755] If it is determined in step S283 that all gain control positioninformation GC0 to GC11 have been encoded, the process proceeds to stepS284. In step S284, the encoder 101-3 outputs the codes determined instep S282 for the respective gain control position information GC0 toGC11 to the terminal connected to the switch 103.

[0756] In the next step S285, the encoder 101-3 calculates the sum ofthe numbers of bits of the encoded gain control position information GC0to GC11 and outputs the calculated sum to the decision unit 102.

[0757] For example, in the case of 39 pieces of gain control positioninformation GC shown in FIG. 87, codes with numbers of bits such asthose shown in FIG. 87 are generated as a result of encoding, and thus asignal indicating that the total number of bits is equal to 137 isoutput to the decision unit 102.

[0758] If the conventional fixed-length (5-bit) encoding method wereemployed, the gain control position information GC in the example shownin FIG. 87 would be encoded into codes with a total of 195 (=5×39) bits.Thus, the total number of bits of encoded data according to the presentinvention is smaller by 58 than that according to the conventionaltechnique.

[0759] In the encoding tables (FIGS. 88 and 89) employed in the presentexample, some values are encoded using escape codes. Alternatively,specific codes corresponding to respective values may be defined in thetable for all values.

[0760] In the present example, the difference value VC1 is assumed tohave such a characteristic shown in FIG. 85. In a case in which thecharacteristic of the difference value VC1 varies from one encoding unitAi to another, the coding table may be switched depending on thecharacteristic of the difference value VC1.

[0761] The encoding method employed by the encoder 101-4 is described.

[0762] For example, the difference value VC2 obtained by subtractinggain control position information GCi-1 of an encoding unit Ai-1 fromgain control position information GCi of an encoding unit Ai has a highprobability of resulting in a particular value, as shown in FIG. 90.

[0763] In view of the above, the encoder 101-4 encodes the gain controlposition information GC in such a manner that codes with small numbersof bits are assigned to difference values VC2 having high occurrenceprobabilities.

[0764] The operation of the encoder 101-4 is described below withreference to a flow chart shown in FIG. 91.

[0765] In step S291, the encoder 101-4 detects gain control positioninformation GCi of one frequency band from the input gain controlinformation G0 to G11 and determines whether the detected gain controlposition information GCi indicates the position of an attack portion ATor a release portion RE in a similar manner to the encoder 101-2.

[0766] The encoder 101-4 then determines the difference value VC2 bysubtracting, from the detected gain control position information GCi,the gain control position information GCi-1 of the encoding unit Ai-1which is in a lower frequency band adjacent to the frequency band of theencoding unit Ai and which was detected in previous execution of step291.

[0767] Hereinafter, for simplicity, the difference value VC2 obtained bysubtracting the gain control position information GCi-1 from the gaincontrol position information GCi will be referred to simply as thedifference value VC2 of the gain control position information GCi.

[0768] For example, in the case of gain control position information GC3of gain control position information GC0 to GC11 shown in FIG. 92, thedifference value VC2 of first gain control position information GC3 (=6)is calculated as 1 (not shown) as the result of subtraction of firstgain control position information GC2 (=5) from the first gain controlposition information GC3 (=6), and the difference value VC2 of secondgain control position information GC3 (=9) is calculated as 2 (notshown) as the result of subtraction of second gain control positioninformation GC2 (=7) from the second gain control position informationGC3 (=9).

[0769] On the other hand, in the case of gain control positioninformation GC5, the difference value VC2 of first gain control positioninformation GC5 (=6) is calculated as 0 (not shown) as the result ofsubtraction of gain control position information GC4 (=6) from the firstgain control position information GC5 (=6), and a value (=11, not shownin the figure) equal to the value of second gain control positioninformation GC5 (=11) is employed as the difference value VC2 of secondgain control position information GC6 (=11). That is, in this specificcase, because there is no gain control position information GCi-1corresponding to gain control position information GCi, a value equal tothe value of the gain control position information GCi is employed asthe difference value VC2 of that gain control position information GCi.

[0770] In the case of gain control position information GC0, thedifference value VC2 thereof is not given.

[0771] In the next step S292, the encoder 101-4 determines a code to beassigned to the gain control position information GCi.

[0772] More specifically, in a case in which the Nth gain controlposition information GCi to be encoded indicates the position of anattack portion AT, the encoder 101-4 retrieves a code corresponding tothe difference value VC2, calculated in step S291, of the Nth gaincontrol position information GCi from a table shown in FIG. 93 andemploys the retrieved code as the code for the Nth gain control positioninformation GCi.

[0773] For example, in the case of gain control position information GC3in the example shown in FIG. 92, first gain control position informationGC3 (=6) indicates the position of an attack portion AT and thedifference value VC2 thereof is equal to 1, and thus a 4-bit code “0100”is employed as the code of the first gain control position informationGC3. On the other hand, second gain control position information GC3(=9) indicates the position of an attack portion AT and the differencevalue VC2 thereof is equal to 2, and thus a 5-bit code “01100” isemployed as the code of the second gain control position informationGC3.

[0774] On the other hand, in a case in which the Nth gain controlposition information GCi indicates the position of a release portion RE,the encoder 101-4 retrieves a code corresponding to the difference valueVC2, calculated in step S291, of the Nth gain control positioninformation GCi from a table shown in FIG. 94 and employs the retrievedcode as the code for the Nth gain control position information GCi.

[0775] For example, in the case of gain control position information GC6in the example shown in FIG. 92, fifth gain control position informationGC6 (=21) indicates the position of a release portion RE and thedifference value VC2 thereof is 21 (equal to the value of the fifth gaincontrol position information GC6), and thus a 4-bit code “1000” isemployed as the code of the fifth gain control position information GC6.

[0776] As for gain control position information GC0, in this specificexample, values equal to the values of first gain control positioninformation GC0 (=5), second gain control position information GC0 (=7),and third gain control position information GC0 (=9) are respectivelyrepresented using 5 bits and resultant 5-bit expressions are employed asthe codes of first, second, and third gain control position informationGC0, respectively.

[0777] In the table shown in FIG. 93, a 5-bit code “01110” is assignedto a value −2, a 4-bit code “0101” to a value −1, a 2-bit code “00” to avalue 0, a 4-bit code “0100” to a value 1, a 5-bit code “01100” to avalue 2, a 5-bit code “01101” to a value 3, and a 5-bit code “01111” toa value 4.

[0778] Furthermore, in the table shown in FIG. 93, a procedure ofdetermining a code for a value other than the values of −2 to 4 isdefined (more specifically, the code is given by a formula 1+originalvalue). According to this procedure, a 6-bit code is given by acombination of a 1-bit code “1” and a following 5-bit code indicatingthe gain control position information GC (original value).

[0779] In the table shown in FIG. 94, a code with a particular number ofbits is assigned to each value. Furthermore, in the table shown in FIG.94, a procedure of determining a code for a value other than the valueshaving corresponding assigned codes is defined (more specifically, thecode is given by a formula 111+original value). According to thisprocedure, an 8-bit code is given by a combination of a 1-bit code “1”and a following 5-bit code indicating the gain control positioninformation GC (original value).

[0780] In the next step S293, the encoder 101-4 determines whether codeshave been determined for all gain control position information GC0 toGC11, that is, whether all gain control position information GC0 to GC11have been encoded. If it is determined that all pieces of gain controlposition information GCi have not been encoded, the process returns tostep S291 to perform the step S291 and following steps to encode nextunencoded gain control position information GCi.

[0781] If it is determined in step S293 that all gain control positioninformation GC0 to GC11 have been encoded, the process proceeds to stepS294. In step S294, the encoder 101-4 outputs the codes determined instep S292 for the respective gain control position information GC0 toGC11 to the terminal connected to the switch 103.

[0782] In the next step S295, the encoder 101-4 calculates the sum ofthe numbers of bits of the encoded gain control position information GC0to GC11 and outputs the calculated sum to the decision unit 102.

[0783] For example, in the case of 37 pieces of gain control positioninformation GC shown in FIG. 92, codes with numbers of bits such asthose shown in FIG. 92 are generated as a result of encoding, and thusthe total number of bits of the codes becomes equal to 126. Thus, asignal indicating that the total number of bits is equal to 126 isoutput to the decision unit 102.

[0784] If the conventional fixed-length (5-bit) encoding method wereemployed, the gain control position information GC in the example shownin FIG. 92 would be encoded into codes with a total of 185 (=5×37) bits.Thus, the total number of bits of encoded data according to the presentinvention is smaller by 59 than that according to the conventionaltechnique.

[0785] In the encoding tables (FIGS. 93 and 94) employed in the presentexample, some values are encoded using escape codes. Alternatively,specific codes corresponding to respective values may be defined in thetable for all values.

[0786] In the present example, the difference value VC2 is assumed tohave such a characteristic shown in FIG. 90. In a case in which thecharacteristic of the difference value VC2 varies from one encoding unitAi to another, the coding table may be switched depending on thecharacteristic of the difference value VC2.

[0787] The encoding method employed by the encoder 101-5 is described.

[0788] As described earlier with reference to FIG. 85, the differencevalue VC1 obtained by subtracting the Nth gain control positioninformation GCi from the (N+1)th gain control position information GCihas a high probability of becoming equal to a particular value.

[0789] As described earlier with reference to FIG. 90, the differencevalue VC2 obtained by subtracting the Nth gain control positioninformation GCi-1 of a lower frequency band immediately adjacent to theNth gain control position information GCi from the Nth gain controlposition information GCi has a high probability of becoming equal to aparticular value.

[0790] Therefore, for example, the difference value VC3 obtained bysubtracting the difference value VC1 of Nth gain control amountinformation GCi-1 from the difference value VC1 of Nth gain controlamount information GCi has a high probability of becoming equal to aparticular value as shown in FIG. 95.

[0791] In view of the above, the encoder 101-5 encodes the gain controlposition information GC in such a manner that codes with small numbersof bits are assigned to difference values VC3 having high occurrenceprobabilities.

[0792] The operation of the encoder 101-5 is described below withreference to a flow chart shown in FIG. 96.

[0793] In step S301, the encoder 101-5 detects gain control positioninformation GCi of one frequency band from the input gain controlinformation G0 to G11 and determines whether the detected gain controlposition information GCi indicates the position of an attack portion ATor a release portion RE in a similar manner to the encoder 101-2.

[0794] The encoder 101-5 then calculates the difference value VC1 bysubtracting Nth gain control position information GCi from (N+1)th gaincontrol position information GCi of gain control position informationGCi. As for first gain control position information GCi, the differencevalue VC1 thereof is defined as being equal to the value of the firstgain control position information GCi.

[0795] For example, in the case of gain control position information GC2of gain control position information GC0 to GC11 shown in FIG. 79, and avalue (5, not shown in the figure) equal to the value of first gaincontrol position information GC2 (=5) is employed as the differencevalue VC2 of the first gain control position information, and thedifference value VC1 of second gain control position information GC2(=7) is calculated as 2 (not shown) as the result of subtraction offirst gain control position information GC2 (=5) from the second gaincontrol position information GC2 (=7).

[0796] On the other hand, as for gain control position information GC3,a value (6, not shown in the figure) equal to the value of first gaincontrol position information GC3 (=6) is employed as the differencevalue VC1 of the first gain control position information GC3 (=6), andthe difference value VC1 of second gain control position information GC3(=9) is calculated as 3 (not shown) as the result of subtraction of thefirst gain control position information GC3 (=6) from the second gaincontrol position information GC3 (=9).

[0797] In the next step S302, the encoder 101-5 determines thedifference value VC3 by subtracting the difference value VC1 of the gaincontrol position information GCi-1 determined in the previous executionof step S301 from the difference value VC1 of the gain control positioninformation GCi determined in step S301.

[0798] Hereinafter, for simplicity, the difference value VC3 obtained bysubtracting the difference value VC1 of the gain control positioninformation GCi-1 from the difference value VC1 of the gain controlposition information GCi will be referred to simply as the differencevalue VC3 of the gain control position information GCi.

[0799] For example, in the case of gain control position information GC3in the example shown in FIG. 97, the difference value VC3 of first gaincontrol position information GC3 (=6) is calculated as 1 as the resultof subtraction of first gain control position information GC2 (=5) fromthe first gain control position information GC3 (=6), and the differencevalue VC3 of second gain control position information GC3 (=9) iscalculated as 1 as the result of subtraction of second gain controlposition information GC2 (=7) from the second gain control positioninformation GC3 (=9).

[0800] As for gain control position information GC0, a value equal tothe difference value VC1 is employed as the difference value VC3 of thegain control position information GC0.

[0801] In the next step S303, the encoder 101-5 determines a code to beassigned to the gain control position information GCi.

[0802] More specifically, in a case in which the gain control positioninformation GCi indicates the position of an attack portion AT, theencoder 101-5 retrieves a code corresponding to the difference valueVC3, calculated in step S302, of the gain control position informationGCi from a table shown in FIG. 98 and employs the retrieved code as thecode for the gain control position information GCi.

[0803] For example, in the case of gain control position information GC3in the example shown in FIG. 97, first gain control position informationGC3 (=6) indicates the position of an attack portion AT and thedifference value VC3 thereof is equal to 1, and thus a 3-bit code “010”is employed as the code of the first gain control position informationGC3. Second gain control position information GC3 (=9) also indicatesthe position of an attack portion AT and the difference value VC3thereof is equal to 1, and thus a 3-bit code “010” is employed as thecode of the second gain control position information GC3.

[0804] On the other hand, in a case in which the Nth gain controlposition information GCi indicates the position of a release portion RE,the encoder 101-5 retrieves a code corresponding to a value equal to thedifference value VC3, calculated in step S302, of the Nth gain controlposition information GCi from a table shown in FIG. 99 and employs theretrieved code as the code for the Nth gain control position informationGCi.

[0805] For example, in the case of gain control position information GC6in the example shown in FIG. 97, fifth gain control position informationGC6 (=21) indicates the position of an release portion RE and thedifference value VC3 thereof is equal to 10, and thus a 5-bit code“11011” is employed as the code of the fifth gain control positioninformation GC6.

[0806] In the table shown in FIG. 98, a code with a particular number ofbits is assigned to each value. Furthermore, in the table shown in FIG.98, a procedure of determining a code for a value other than the valueshaving corresponding assigned codes is defined (more specifically, thecode is given by a formula 11+original value). According to thisprocedure, a 7-bit code is given by a combination of a 2-bit code “11”and a following 5-bit code indicating the gain control positioninformation GC (original value).

[0807] In the table shown in FIG. 99, a code with a particular number ofbits is assigned to each value. Furthermore, in the table shown in FIG.99, a procedure of determining a code for a value other than the valueshaving corresponding assigned codes is defined (more specifically, thecode is given by a formula 111+original value). According to thisprocedure, a code is determined which has a total of 8 bits including a3-bit code “111” and a following 5-bit code indicating the gain controlposition information GC (original value).

[0808] In the next step S304, the encoder 101-5 determines whether codeshave been determined for all gain control position information GC0 toGC11, that is, whether all gain control position information GC0 to GC11have been encoded. If it is determined that all pieces of gain controlposition information GCi have not been encoded, the process returns tostep S301 to perform the step S301 and following steps to encode nextunencoded gain control position information GCi.

[0809] If it is determined in step S304 that all gain control positioninformation GC0 to GC11 have been encoded, the process proceeds to stepS305. In step S305, the encoder 101-5 outputs the codes determined instep S303 for the respective gain control position information GC0 toGC11 to the terminal connected to the switch 103.

[0810] In the next step S306, the encoder 101-5 calculates the sum ofthe numbers of bits of the encoded gain control position information GC0to GC11 and outputs the calculated sum to the decision unit 102.

[0811] For example, in the case of 37 pieces of gain control positioninformation GC shown in FIG. 97, codes with numbers of bits such asthose shown in FIG. 97 are generated as a result of encoding, and thusthe total number of bits of the codes becomes equal to 109. Thus, asignal indicating that the total number of bits is equal to 109 isoutput to the decision unit 102.

[0812] If the conventional fixed-length (5-bit) encoding method wereemployed, the gain control position information GC in the example shownin FIG. 97 would be encoded into codes with a total of 185 (=5×37) bits.Thus, the total number of bits of encoded data according to the presentinvention is smaller by 76 than that according to the conventionaltechnique.

[0813] In the encoding tables (FIGS. 98 and 99) employed in the presentexample, some values are encoded using escape codes. Alternatively,specific codes corresponding to respective values may be defined in thetable for all values.

[0814] In the present example, the difference value VC3 is assumed tohave such a characteristic shown in FIG. 95. In a case in which thecharacteristic of the difference value VC3 varies from one encoding unitAi to another, the coding table may be switched depending on thecharacteristic of the difference value VC3.

[0815] The encoding method employed by the encoder 101-6 is described.

[0816] In some cases, in gain control position information GCi-1 andgain control position information GCi, there are an equal number ofpieces of gain control position information GC and, besides, Nth gaincontrol position information GCi and corresponding Nth gain controlposition information GCi-1 are equal to each other, as is the case withgain control position information GC0 and gain control positioninformation GC1 of gain control position information GC0 to GC11 shownin FIG. 100.

[0817] In view of the above, the encoder 101-6 encodes gain controlposition information GC in such a manner that, in the case in which, ingain control position information GCi-1 and gain control positioninformation GCi, there are an equal number of pieces of gain controlposition information GC and, besides, Nth gain control positioninformation GCi and corresponding Nth gain control position informationGCi-1 are equal to each other, only a flag (encoding flag) set to avalue (0, in this specific example) indicating the above fact isencoded.

[0818] The operation of the encoder 106-6 is described below withreference to a flow chart shown in FIG. 101.

[0819] In step S301, the encoder 101-6 detects gain control positioninformation GCi of one frequency band from the input gain controlinformation G0 to G11. The encoder 101-6 then determines whether thereare an equal number of pieces of gain control position information GC inboth gain control position information GCi and gain control positioninformation GCi-1 detected in previous execution of step S301, andbesides Nth gain control position information GCi and corresponding Nthgain control position information GCi-1 are equal to each other. If itis determined that there are an equal number of pieces of gain controlposition information GC, and Nth gain control position information GCiand corresponding Nth gain control position information GCi-1 are equalto each other, the process proceeds to step S312. In step S312, theencoding flag associated with the gain control position information GCiis set to a value (0, in this specific example) so as to indicate theabove fact.

[0820] For example, in the case of gain control position information GC1and gain control position information GC0 in the example shown in FIG.100, there are equally 3 pieces of gain control position information GC,and first, second, and third gain control position information GC1 (=7,9, 11) are equal to first, second, and third gain control positioninformation GC0 (=7, 9, 11), respectively, and thus the encoding flagassociated with the gain control position information GC1 is set to 0.

[0821] On the other hand, if it is determined in step S311 that thenumber of pieces of gain control position information GC is differentbetween gain control position information GCi and gain control positioninformation GCi-1, or Nth gain control position information GCi is notequal to corresponding Nth gain control position information GCi-1, theprocess proceeds to step S313. In step S313, the encoder 101-6 sets theencoding flag associated with the gain control position information GCito a value (1, in this specific example) so as to indicate the abovefact.

[0822] For example, in the case of gain control position information GC2and gain control position information GC1 in the example shown in FIG.100, the number of pieces of gain control position information GC isdifferent between them, and thus the encoding flag associated with thegain control position information GC2 is set to 1.

[0823] In the next step S314, the encoder 101-6 encodes the gain controlposition information GCi in a similar manner as with, for example, theencoder 101-3.

[0824] That is, the encoder 101-6 determines the difference value VC1 of(N+1)th gain control position information GCi by subtracting Nth gaincontrol position information GCi from the (N+1)th gain control positioninformation GCi. As for first gain control position information GCi, thedifference value VC1 thereof is defined as being equal to the value ofthe first gain control position information GCi.

[0825] The encoder 101-6 retrieves a code corresponding to thedifference value VC1 of Nth gain control position information GCi from atable similar to that shown in FIG. 88 or a table similar to that shownin FIG. 89 depending on whether the Nth gain control positioninformation GCi indicates the position of an attack portion AT or arelease portion RE, and the encoder 101-6 employs the retrieved code asthe code of the Nth gain control position information GCi.

[0826] If the encoding flag has been set to 0 in step S312, or if thecode of gain control position information GCi has been determined instep S314, the process proceeds to step S315. In step S315, the encoder101-6 determines whether all encoding flags have been set to 0 or 1 andcodes have been determined for all pieces of gain control positioninformation GCi corresponding to the encoding flags set to 1, that is,the encoder 101-6 determines whether encoding has been completed for allpieces of gain control position information GC0 to GC11. If it isdetermined that all pieces of gain control position information GCi havenot been encoded, the process returns to step S311 to perform the stepS311 and following steps to encode next unencoded gain control positioninformation GCi.

[0827] If it is determined in step S315 that all gain control positioninformation GC0 to GC11 have been encoded, the process proceeds to stepS316. In step S316, the encoder 101-6 outputs the encoding flag set to 0or 1 and the codes to the terminal connected to the switch 103.

[0828] In the next step S317, the encoder 101-6 calculates the sum ofthe numbers of bits of the encoded gain control position information GC0to GC11 and outputs the calculated sum to the decision unit 102.

[0829] For example, in the case of 35 pieces of gain control positioninformation GC shown in FIG. 100, 11 1-bit encoding flags (there is noencoding flags associated with gain control position information GC0 inthis specific case) and codes with numbers of bits such as those shownin FIG. 100 are generated as the result of the encoding, and thus asignal indicating that the total number of bits is equal to 72 is outputto the decision unit 102.

[0830] If the conventional fixed-length (5-bit) encoding method wereemployed, the gain control position information GC in the example shownin FIG. 100 would be encoded into codes with a total of 175 (=5×35)bits. Thus, the total number of bits of encoded data according to thepresent invention is smaller by 103 than that according to theconventional technique.

[0831] Although in the case where there are equal number of pieces ofgain control position information GC in both gain control positioninformation GCi and gain control position information GCi-1 but Nth gaincontrol position information GCi and Nth gain control positioninformation GCi-1 are not equal to each other, the encoder 101-6 encodesgain control position information GCi in a similar manner to the encoder101-3, each piece of gain control position information GCi may beencoded into a code with a fixed bit length (5 bits).

[0832] The encoding method employed by the encoder 101-7 is described.

[0833] In most cases, plural pieces of gain control position informationGCi take values which are close to each other as is the case with gaincontrol position information GC3, shown in FIG. 102, of gain controlposition information GC0 to GC11. Therefore, values obtained bysubtracting the minimum value of the values of gain control positioninformation GCi from the values of respective pieces of gain controlposition information GCi become small enough to represent with a smallnumber of bits.

[0834] In view of the above, the encoder 101-7 encodes gain controlposition information GC in such a manner that the minimum value of thegain control position information GC0 to GC11 is subtracted from Nthgain control position information GCi, the resultant difference isexpressed using a particular number of bits, and the resultantexpression is employed as the code of the Nth gain control positioninformation GCi.

[0835] The operation of the encoder 101-7 is described below withreference to a flow chart shown in FIG. 103.

[0836] In step S321, the encoder 101-7 detects gain control positioninformation GCi of one frequency band from the input gain controlinformation G0 to G11.

[0837] In the next step S322, the encoder 101-7 determines a code to beassigned to the detected gain control position information GCi. Thedetails of the process in step S322 are shown in the form of a flowchart in FIG. 104.

[0838] In step S331, the encoder 101-7 detects maximum and minimumvalues of the gain control position information GCi.

[0839] In the example shown in FIG. 102, 8 is detected as the maximumvalue and 5 is detected as the minimum value.

[0840] In step S332, the encoder 101-7 calculates the difference betweenthe maximum and minimum values detected in step S331 and determines thenumber of bits which can represent the difference.

[0841] In the example shown in FIG. 102, the difference between themaximum value (8) and the minimum value (5) is equal to 3, and thus thenumber of bits which can represent the difference is 2.

[0842] In step S333, the encoder 101-7 subtracts the minimum valuedetected in step S331 from respective values of gain control positioninformation GCi and represents the resultant difference values using asmany bits as the necessary number of bits determined in sep S332. Theresultant values are employed as codes for the respective pieces of gaincontrol position information GCi. Because the necessary number of bitsis defined as the number of bits which can represent the differencebetween the maximum value and the minimum value, the value obtained bysubtracting the minimum value from any gain control position informationGCi can be represented using as many bits as the necessary number ofbits.

[0843] In the example shown in FIG. 102, 0, 1, 2, and 3 obtained bysubtracting 5 from first gain control position information GC3 (=5),second gain control position information GC3 (=6), third gain controlposition information GC3 (=7), and fourth gain control positioninformation GC3 (=8), respectively, are expressed using 2 bits, andresultant 2-bit expressions are employed as codes of first gain controlposition information GC3 to fourth gain control position informationGC3, respectively.

[0844] Thereafter, the process proceeds to step S323 shown in FIG. 103.

[0845] In step S323, the encoder 101-7 determines whether codes havebeen determined for all gain control position information GC0 to GC11,that is, whether all gain control position information GC0 to GC11 havebeen encoded. If it is determined that all pieces of gain controlposition information GCi have not been encoded, the process returns tostep S321 to perform the step S321 and following steps to encode nextunencoded gain control position information GCi.

[0846] If it is determined in step S323 that all gain control positioninformation GC0 to GC11 have been encoded, the process proceeds to stepS324. In step S324, The data indicating the minimum value detected instep S331, the data indicating the necessary number of bits calculatedin step S332, and the codes, determined in step S333, of gain controlposition information GC0 to GC11 represented by as many bits as thenecessary number of bits are output from the encoder 101-7 to theterminal connected to the switch 103.

[0847] In the next step S325, the encoder 101-7 calculates the sum ofthe numbers of bits of the encoded gain control position information GC0to GC11 and outputs the calculated sum to the decision unit 102.

[0848] For example, in the case of gain control position information GC3shown in FIG. 102, 2-bit data indicating a necessary number of bits,5-bit data indicating a minimum value, and 4 2-bit codes (represented byas many bits as the necessary number of bits are generated as the resultof the encoding, and thus a signal indicating that the total number ofbits is equal to 15 (=2+5+2×4) is output to the decision unit 102.

[0849] If the conventional fixed-length (5-bit) encoding method wereemployed, the gain control position information GC in the example shownin FIG. 102 would be encoded into codes with a total of 20 (=5×4) bits.Thus, the total number of bits of encoded data according to the presentinvention is smaller by 5 than that according to the conventionaltechnique.

[0850] The encoding method employed by the encoder 101-8 is described.

[0851] Gain control position information GC0 to GC11 have highprobabilities of taking values close to each other, as is the case withgain control position information GC0 to GC11 shown in FIG. 105, andthus subtraction of the minimum value (3, in the example shown in FIG.105) of the gain control position information GC0 to GC11 from thevalues of respective pieces of gain control position information GCiresult in small values which can be represented using a small number ofbits.

[0852] In view of the above, the encoder 101-8 encodes gain controlposition information GC in such a manner that the minimum value of thegain control position information GC0 to GC11 is subtracted from gaincontrol position information GCi, the resultant difference is expressedusing a particular number of bits, and the resultant expression isemployed as the code of the gain control position information GCi.

[0853] The operation of the encoder 101-8 is described below withreference to a flow chart shown in FIG. 106.

[0854] In step S341, the encoder 101-8 extracts gain control positioninformation GC0 to GC11 from the input gain control information G0 toG11 and detects maximum and minimum values of the extracted gain controlposition information GC0 to GC11.

[0855] In the example shown in FIG. 105, 10 is detected as the maximumvalue and 3 is detected as the minimum value.

[0856] In step S342, the encoder 101-8 calculates the difference betweenthe maximum and minimum values detected in step S341 and determines thenumber of bits which can represent the difference.

[0857] In the example shown in FIG. 105, the difference between themaximum value (10) and the minimum value (3) is equal to 7, and thus thenecessary number of bits is 3.

[0858] In step S343, the encoder 101-8 subtracts the minimum valuedetected in step S341 from the respective values of gain controlposition information GC0 to GC11 and represents the resultant differencevalues using as many bits as the necessary number of bits determined insep S342. The resultant values are employed as codes for the respectivepieces of gain control position information GC. Because the necessarynumber of bits is defined as the number of bits which can represent thedifference between the maximum value and the minimum value, the valueobtained by subtracting the minimum value from any gain control positioninformation GC can be represented using as many bits as the necessarynumber of bits.

[0859] In step S344, the data indicating the minimum value detected instep S341, the data indicating the necessary number of bits calculatedin step S342, and the codes of respective pieces of gain controlposition information, determined in step S343, of gain control positioninformation GC0 to GC11 represented by as many bits as the necessarynumber of bits are output from the encoder 101-8 to the terminalconnected the switch 103.

[0860] In the example shown in FIG. 105, as shown in FIG. 107, 5-bitdata indicating a minimum value (=3), 2-bit data indicating a necessarynumber of bits (2 bits), and 22 codes expressed in 3 bits (equal to thenecessary number of bits) are output to the terminal connected theswitch 103.

[0861] In the next step S345, the encoder 101-8 calculates the sum ofthe numbers of bits of the encoded gain control position information GC0to GC11 and outputs the calculated sum to the decision unit 102.

[0862] For example, in the case of 22 pieces of gain control positioninformation GC shown in FIG. 105, 2-bit data indicating a necessarynumber of bits, 5-bit data indicating a minimum value, and 22 codesrepresented in 3 bits (equal to the necessary number of bits) aregenerated as the result of the encoding, and thus a signal indicatingthat the total number of bits is equal to 73 (=2+5+3×22) is output tothe decision unit 102.

[0863] If the conventional fixed-length (5-bit) encoding method wereemployed, the gain control position information GC in the example shownin FIG. 105 would be encoded into codes with a total of 110 (=5×22)bits. Thus, the total number of bits of encoded data according to thepresent invention is smaller by 37 than that according to theconventional technique.

[0864] The encoding method employed by the encoder 101-9 is described.

[0865] In most cases, in the stereo audio signal, the gain controlposition information GCLi of the left-channel signal and the gaincontrol position information GCRi of the right-channel signal in thesame frequency band are equal or close to each other. Therefore, theabsolute value of the difference value WC1 obtained by subtracting thegain control position information GCLi from the gain control positioninformation GCRi has a high probability of becoming equal or nearlyequal to 0, as shown in FIG. 108.

[0866] In view of the above, the encoder 101-9 encodes gain controlposition information GCL such that either gain control positioninformation GCL0 to GCL11 or gain control position information GCR0 toGCR11, and codes with small numbers of bits are assigned to differencevalues WC1 having high occurrence probabilities.

[0867] The operation of the encoder 101-9 is described below withreference to a flow chart shown in FIG. 109.

[0868] Herein, it is assumed that the encoder 101-9 encodes gain controlposition information GCR.

[0869] In step S351, the encoder 101-9 detects gain control positioninformation GCLi of one frequency band from gain control information GL0to GL11 of the input left-channel signal and also detects gain controlposition information GCRi of the same frequency band from gain controlinformation GR0 to GR11 of the input right-channel signal. The encoder101-9 calculates the difference value WC1 by subtracting the detectedgain control position information GCLi from the detected gain controlposition information GCRi.

[0870] Hereinafter, for simplicity, the difference value WC1 obtained bysubtracting the gain control position information GCLi from the gaincontrol position information GCRi will be referred to simply as thedifference value WC1 of the gain control position information GCRi.

[0871] For example, in the case of gain control position informationGCL3 of gain control position information GCL0 to GCL11 and gain controlposition information GCR3 of gain control position information GCR0 toGCR11 shown in FIG. 110, the difference value WC1 of first gain controlposition information GCR3 is calculated as 0 as the result ofsubtraction of first gain control position information GCL3 (=7) fromthe first gain control position information GCR3 (=7), and thedifference value WC1 of second gain control position information GCR3 iscalculated as 0 as the result of subtraction of second gain controlposition information GCL3 (=23) from the second gain control positioninformation GCR3 (=23).

[0872] In the next step S352, the encoder 101-9 determines whether thegain control position information GCRi indicates the position of anattack portion AT or a release portion RE, in a similar manner to theencoder 101-2. If the gain control position information GCRi indicatesthe position of an attack portion AT, the encoder 101-9 retrieves a codecorresponding to the difference value WC1 calculated in step S351 fromthe table shown in FIG. 111, while if the gain control positioninformation GCRi indicates the position of a release portion RE, theencoder 101-9 retrieves a code corresponding to the difference value WC1calculated in step S351 from the table shown in FIG. 112. The encoder101-9 employs the retrieved code as the code for the gain controlposition information GCRi.

[0873] For example, in the case of first gain control positioninformation GCR3 (=7) of gain control position information GCR3 in theexample shown in FIG. 110, the first gain control position informationGCR3 indicates the position of an attack portion AT and the differencevalue WC1 thereof is equal to 1, and thus a 1-bit code “0” is employedas the code of the first gain control position information GCR3.

[0874] On the other hand, as for the code of second gain controlposition information GCR3 (=23), the second gain control positioninformation GCLR3 indicates the position of a release portion RE and thedifference value WC1 thereof is equal to 0, and thus a 1-bit code “0” isemployed as the code of the second gain control position informationGCR3.

[0875] In the table shown in FIG. 111, a code with a particular numberof bits is assigned to each value. Furthermore, in the table shown inFIG. 111, a procedure of determining a code for a value other than thevalues having corresponding assigned codes is defined (morespecifically, the code is given by a formula 11+original value).According to this procedure, a 7-bit code is given by a combination of a2-bit code “11” and a following 5-bit code indicating the gain controlposition information GC (original value, the gain control positioninformation GCR in this specific case).

[0876] In the table shown in FIG. 112, a code with a particular numberof bits is assigned to each value. Furthermore, in the table shown inFIG. 112, a procedure of determining a code for a value other than thevalues having corresponding assigned codes is defined (morespecifically, the code is given by a formula 111+original value).According to this procedure, an 8-bit code is given by a combination ofa 3-bit code “111” and a following 5-bit code indicating the gaincontrol position information GC (original value, the gain controlposition information GCR in this specific case).

[0877] In step S353, the encoder 101-9 determines whether codes havebeen determined for all gain control position information GCR0 to GCR11,that is, whether all gain control position information GCR0 to GCR11have been encoded. If it is determined that all pieces of gain controlposition information GCR have not been encoded, the process returns tostep S351 to perform the step S351 and following steps to encode nextunencoded gain control position information GCR.

[0878] If it is determined in step S353 that all gain control positioninformation GCR0 to GCR11 have been encoded, the process proceeds tostep S354. In step S354, the encoder 101-9 outputs the codes determinedin step S352 for the respective gain control position information GCR0to GCR11 to the terminal connected to the switch 103.

[0879] In step S355, the encoder 101-9 calculates the sum of the numbersof bits of the encoded gain control position information GCR0 to GCR11and outputs the calculated sum to the decision unit 102.

[0880] For example, in the case of 17 pieces of gain control positioninformation GCR shown in FIG. 110, codes with numbers of bits such asthose shown in FIG. 110 are generated as a result of encoding, and thusa signal indicating that the total number of bits is equal to 29 isoutput to the decision unit 102.

[0881] If the conventional fixed-length (5-bit) encoding method wereemployed, the gain control position information GC in the example shownin FIG. 110 would be encoded into codes with a total of 85 (=5×17) bits.Thus, the total number of bits of encoded data according to the presentinvention is smaller by 56 than that according to the conventionaltechnique.

[0882] In the encoding tables (FIGS. 111 and 112) employed in thepresent example, some values are encoded using escape codes.Alternatively, specific codes corresponding to respective values may bedefined in the table for all values.

[0883] In the present example, the difference value WC1 is assumed tohave such a characteristic shown in FIG. 108. In a case in which thecharacteristic of the difference value WC1 varies from one encoding unitAi to another, the coding table may be switched depending on thecharacteristic of the difference value WC1.

[0884] The encoding method employed by the encoder 101-10 is described.

[0885] In many cases, in gain control position information GCLi of aleft-channel signal and gain control position information GCRi of aright-channel signal in the same frequency band of a stereo audiosignal, there are an equal number of pieces of gain control positioninformation GC and, besides, Nth gain control position information GCLiand corresponding Nth gain control position information GCRi are equalto each other, as is the case with gain control position informationGCL1 and gain control position information GCR1 of gain control positioninformation GC0 to GC11 and gain control position information GCR0 toGCR11 shown in FIG. 113.

[0886] In view of the above, the encoder 101-10 encodes either gaincontrol position information GCL0 to GCL11 or gain control positioninformation GCR0 to GCR11 into codes with a fixed bit length, andencodes the other in such manner that when, in gain control positioninformation GCLi and gain control position information GCRi, there arean equal number of pieces of gain control position information GC and,besides, Nth gain control position information GCLi and correspondingNth gain control position information GCRi are equal to each other, onlya flag (encoding flag) set to a value (0, in this specific example)indicating the above fact is encoded.

[0887] In the case in which gain control position information GCL isencoded into codes with a fixed bit length, coding of gain controlposition information GCR is performed in a manner described below withreference to a flow chart shown in FIG. 114.

[0888] In step S361, the encoder 101-10 detects gain control positioninformation GCLi in one frequency band from gain control information GL0to GL11 of the input left-channel signal and also detects gain controlposition information GCRi in the same frequency band from gain controlinformation GR0 to GR11 of the input right-channel signal. The encoder101-10 determines whether in gain control position information GCLi andgain control position information GCRi, there are an equal number ofpieces of gain control position information GC and, besides, Nth gaincontrol position information GCLi and corresponding Nth gain controlposition information GCRi are equal to each other. If it is determinedthat in gain control position information GCLi and gain control positioninformation GCRi, there are an equal number of pieces of gain controlposition information GC and, besides, Nth gain control positioninformation GCLi and corresponding Nth gain control position informationGCRi are equal to each other, the process proceeds to step S362. In stepS362, the encoder 101-10 sets the encoding flag associated with the gaincontrol position information GCRi to a value (0 in this specificexample) so as to indicate the above fact.

[0889] For example, in the case of gain control position informationGCL1 and gain control position information GCR1 in the example shown inFIG. 113, there are equally 3 pieces of gain control positioninformation GC and, besides, first, second, and third gain controlposition information GCL1 (=4, 5, 13) and corresponding first, second,and third gain control position information GCR1 (=4, 5, 13) are equalto each other, and thus the encoding flag associated with the gaincontrol position information GCR1 is set to 0.

[0890] On the other hand, if it is determined in step S361 that in gaincontrol position information GCLi and gain control position informationGCRi, the numbers of pieces of gain control position information GC arenot equal or Nth gain control position information GCLi andcorresponding Nth gain control position information GCRi are not equalto each other, the process proceeds to step S363. In step S363, theencoder 101-10 sets the encoding flag associated with the gain controlposition information GCRi to 1.

[0891] In the next step S364, the encoder 101-10 encodes the gaincontrol position information GCRi in a similar manner as to, forexample, the encoder 101-9.

[0892] That is, the encoder 101-10 calculates the difference value WC1by subtracting the Nth gain control position information GCLi from theNth gain control position information GCRi.

[0893] The encoder 101-10 retrieves a code corresponding to thedifference value WC1 of the Nth gain control position information GCRifrom a table similar to that shown in FIG. 111 or a table similar tothat shown in FIG. 112 depending on whether the Nth gain controlposition information GCRi indicates the position of an attack portion ATor a release portion RE, and the encoder 101-10 employs the retrievedcode as the code of the Nth gain control position information GCRi.

[0894] In the case in which an encoding flag has been set to 0 in stepS362 or in the case in which gain control position information GCRi hasbeen encoded in step S364, the process proceeds to step S365. In stepS365, the encoder 101-10 determines whether all encoding flags have beenset to 0 or 1 and codes have been determined for all pieces of gaincontrol position information GCRi corresponding to the encoding flagsset to 1, that is, the encoder 101-10 determines whether encoding hasbeen completed for all pieces of gain control position information GCR0to GCR11. If it is determined that all pieces of gain control positioninformation GCRi have not been encoded, the process returns to step S361to perform the step S361 and following steps to encode next unencodedgain control position information GCRi.

[0895] If it is determined in step S365 that all gain control positioninformation GCR0 to GCR11 have been encoded, the process proceeds tostep S366. In step S366, the encoder 101-10 outputs the encoding flagset to 0 or 1 and the codes to the terminal connected to the switch 103.

[0896] In the next step S367, the encoder 10-10 calculates the sum ofthe numbers of bits of the encoded gain control position informationGCR0 to GCR11 and outputs the calculated sum to the decision unit 102.

[0897] For example, in the case of 22 pieces of gain control positioninformation GCR shown in FIG. 113, 12 1-bit encoding flags and codeswith number of bits such as those shown in FIG. 113 are generated as aresult of encoding, and thus a signal indicating that the total numberof bits is equal to 31 is output to the decision unit 102.

[0898] If the conventional fixed-length (5-bit) encoding method wereemployed, the gain control position information GC in the example shownin FIG. 113 would be encoded into codes with a total of 110 (=5×22)bits. Thus, the total number of bits of encoded data according to thepresent invention is smaller by 79 than that according to theconventional technique.

[0899] In the present embodiment, in the case in which it is determinedthat in gain control position information GCLi and gain control positioninformation GCRi, the numbers of pieces of gain control positioninformation GC are not equal, or Nth gain control position informationGCLi and corresponding Nth gain control position information GCRi arenot equal to each other, encoding of gain control position informationGCRi is performed in a similar manner as with the encoder 101-9.Alternatively, fixed-bit-length encoding (5-bit encoding) may beemployed.

[0900] The encoding method employed by the encoder 101-11 is described.

[0901] In some cases, in the stereo audio signal, as shown in FIG. 115,all gain control position information GCL0 to GCL11 of the left-channelsignal become equal to corresponding gain control position informationGCR0 to GCR11 of the right-channel signal.

[0902] In view of the above, the encoder 101-11 encodes either gaincontrol position information GCL0 to GCL11 or gain control positioninformation GCR0 to GCR11 into codes with a fixed bit length, but, whengain control amount information GBL0 to GBL11 are all equal tocorresponding gain control amount information GBR0 to GBR11, encoding ofthe other set of gain control amount information is not performed.

[0903] In a case in which gain control position information GCL isencoded into codes with a fixed bit length, coding of gain controlposition information GCR is performed in a manner described below withreference to a flow chart shown in FIG. 116.

[0904] In step S371, the encoder 101-11 detects gain control positioninformation GCL0 to GCL11 and gain control position information GCR0 toGCR11 from the input gain control information GL0 to GL11 of theleft-channel signal and gain control information GR0 to GR11 of theright-channel signal, respectively. The encoder 101-11 then determineswhether the gain control position information GCL0 to GCL11 and the gaincontrol position information GCR0 to GCR11 are equal to each otherbetween corresponding counterparts. If it is determined that they areall equal to each other as is the case in the example shown in FIG. 115,the process proceeds to step S372.

[0905] In step S372, the encoder 101-11 does not encode the gain controlposition information GCR0 to GCR11, in this case, but the encoder 101-11outputs a value of 0 indicating that the number of bits of codes isequal to 0 to the decision unit 102.

[0906] In a case in which it is determined in step S371 that the gaincontrol position information GCL0 to GCL11 and the gain control positioninformation GCR0 to GCR11 are not equal to each other betweencorresponding counterparts, the process proceeds to step S373. In stepS373, the encoder 101-11 encodes the gain control position informationGCR0 to GCR11, for example, into codes with a fixed bit length (5 bits).

[0907] In the next step S374, the encoder 101-11 outputs the resultantcodes of the respective gain control position information GCR0 to GCR11to the terminal connected to the switch 103.

[0908] In step S375, the encoder 101-11 calculates the sum of thenumbers of bits of the encoded gain control position information GCR0 toGCR11 and outputs the calculated sum to the decision unit 102.

[0909] In the example shown in FIG. 115, the total number of bits of thecodes of the gain control position information GCL is equal to 100(=5×20). Thus, a signal indicating that the total number of bits isequal to 100 is output to the decision unit 102.

[0910] After step S372 or step S375, the process performed by theencoder 101-11 is completed.

[0911] If the conventional fixed-length (5-bit) encoding method wereemployed, the gain control position information GC in the example shownin FIG. 115 would be encoded into codes with a total of 100 (=5×20)bits. Thus, when the gain control position information GCR is notencoded, the total number of bits of encoded data according to thepresent invention is smaller by 100 than that according to theconventional technique.

[0912] The encoding method employed by the encoder 101-12 is described.

[0913] As described earlier with reference to FIG. 85, in plural piecesof gain control position information GCi, the difference value VC1obtained by subtracting the Nth gain control position information GCifrom the (N+1)th gain control position information GCi has a highprobability of becoming equal to a particular value.

[0914] Furthermore, in the case of stereo audio signals, as describedearlier with reference to FIG. 108, the difference value WC1 obtained bysubtracting gain control position information GCLi from gain controlposition information GCRi in the same frequency band has a highprobability of becoming equal to a particular value.

[0915] Therefore, the difference value WC2 obtained by subtracting thedifference value VC1 of the gain control position information GCLi fromthe difference value VC1 of the gain control position information GCRihas a high probability of taking a particular value (0 or a value whoseabsolute value is close to 0), as shown in FIG. 117.

[0916] In view of the above, the encoder 101-12 encodes gain controlposition information GC such that either gain control positioninformation GCL0 to GCL11 or gain control position information GCR0 toGCR11, and codes with small numbers of bits are assigned to differencevalues WC2 having high occurrence probabilities.

[0917] The operation of the encoder 101-12 is described below withreference to a flow chart shown in FIG. 118. Herein, it is assumed thatthe encoder 101-12 encodes gain control position information GCR.

[0918] In step S381, the encoder 101-12 detects gain control positioninformation GCLi in one frequency band from gain control information GL0to GL11 of the input left-channel signal and also detects gain controlposition information GCRi in the same frequency band from gain controlinformation GR0 to GR11 of the input right-channel signal.

[0919] Furthermore, the encoder 101-12 calculates the difference valueVC1 of (N+1)th gain control position information GCLi by subtracting Nthgain control position information GCLi from the (N+1)th gain controlposition information GCLi, and also calculates the difference value VC1of (N+1)th gain control position information GCRi by subtracting Nthgain control position information GCRi from the (N+1)th gain controlposition information GCRi.

[0920] The difference value VC1 of first gain control positioninformation GCLi is defined as being equal to the value of the firstgain control position information GCLi, and the difference value VC1 offirst gain control position information GCRi is defined as being equalto the value of the first gain control position information GCRi.

[0921] For example, in the case of gain control position informationGCL3 of gain control position information GCL to GCL11 shown in FIG.119, a value (7, not shown in the figure) equal to the value of firstgain control position information GCL3 (=7) is employed as thedifference value VC1 of the first gain control position information GCL3(=7), and the difference value VC1 of second gain control positioninformation GCL3 (=23) is calculated as 16 as the result of subtractionof the first gain control position information GCL3 (=7) from the secondgain control position information GCL3 (=23).

[0922] On the other hand, as for gain control position information GCR3of gain control position information GCR0 to GCR11, a value (7, notshown in the figure) equal to the value of first gain control positioninformation GCR3 (=7) is employed as the difference value VC1 of thefirst gain control position information GCR3 (=7), and the differencevalue VC1 of second gain control position information GCR3 (=23) iscalculated as 16 as the result of subtraction of the first gain controlposition information GCR3 (=7) from the second gain control positioninformation GCR3 (=23).

[0923] In the next step S382, the encoder 101-12 determines thedifference value WC2 by subtracting the difference value VC1 of gaincontrol position information GCLi from the difference value VC1 of gaincontrol position information GCRi.

[0924] Hereinafter, for simplicity, the difference value WC2 obtained bysubtracting the difference value VC1 of the gain control positioninformation GCLi from the difference value VC1 of the gain controlposition information GCRi will be referred to simply as the differencevalue WC2 of the gain control position information GCRi.

[0925] For example, in the case of gain control position informationGCL3 and gain control position information GCR3 in the example shown inFIG. 119, the difference value WC2 of first gain control positioninformation GCR3 is calculated as 0 as the result of subtraction of thedifference value VC1 (=7) of first gain control position informationGCL3 from the difference value VC1 (=7) of the first gain controlposition information GCR3, and the difference value WC2 of second gaincontrol position information GCR3 is calculated as 0 as the result ofsubtraction of the difference value VC1 (=16) of second gain controlposition information GCL3 from the difference value VC1 (=16) of thesecond gain control position information GCR3.

[0926] In step S383, the encoder 101-12 determines whether Nth gaincontrol position information GCRi indicates the position of an attackportion AT or a release portion RE, in a similar manner to the encoder101-2. In the case in which the gain control position information GCRiindicates the position of an attack portion AT, the encoder 101-12retrieves a code corresponding to the difference value WC2 of the Nthgain control position information GCRi from a table shown in FIG. 120and employs the retrieved code as the code of the gain control positioninformation GCRi.

[0927] For example, in the case of gain control position informationGCR3 in the example shown in FIG. 119, first gain control positioninformation GCL3 (=7) indicates the position of an attack portion AT andthe difference value WC2 thereof is equal to 0, and thus a 1-bit code“0” is employed as the code of the first gain control positioninformation GCL3.

[0928] On the other hand, in a case in which the gain control positioninformation GCRi indicates the position of a release portion RE, a codecorresponding to the difference value WC2 of the gain control positioninformation GCRi is retrieved from a table shown in FIG. 121 and theretrieved code is employed as the code of the gain control positioninformation GCRi.

[0929] For example, in the case of gain control position informationGCR3 in the example shown in FIG. 119, second gain control positioninformation GCL3 (=23) indicates the position of a release portion REand the difference value WC3 thereof is equal to 0, and thus a 1-bitcode “0” is employed as the code of the second gain control positioninformation GCL3.

[0930] In the table shown in FIG. 120, a code with a particular numberof bits is assigned to each value. Furthermore, in the table shown inFIG. 120, a procedure of determining a code for a value other than thevalues having corresponding assigned codes is defined (morespecifically, the code is given by a formula 11+original value).According to this procedure, a 7-bit code is given by a combination of a2-bit code “11” and a following 5-bit code indicating the gain controlposition information GC (original value, the gain control positioninformation GCR in this specific case).

[0931] In the table shown in FIG. 121, a code with a particular numberof bits is assigned to each value. Furthermore, in the table shown inFIG. 121, a procedure of determining a code for a value other than thevalues having corresponding assigned codes is defined (morespecifically, the code is given by a formula 111+original value).According to this procedure, an 8-bit code is given by a combination ofa 3-bit code “111” and a following 5-bit code indicating the gaincontrol position information GC (original value, the gain controlposition information GCR in this specific case).

[0932] In the next step S384, the encoder 101-12 determines whethercodes have been determined for all gain control position informationGCR0 to GCR11, that is, whether all gain control position informationGCR0 to GCR11 have been encoded. If it is determined that all pieces ofgain control position information GCRi have not been encoded, theprocess returns to step S381 to perform the step S381 and followingsteps to encode next unencoded gain control position information GCRi.

[0933] If it is determined in step S384 that all gain control positioninformation GCR0 to GCR11 have been encoded, the process proceeds tostep S385. In step S385, the encoder 101-12 outputs the codes determinedin step S383 for the respective gain control position information GCR0to GCR11 to the terminal connected to the switch 103.

[0934] In step S386, the encoder 101-12 calculates the sum of thenumbers of bits of the encoded gain control position information GCR0 toGCR11 and outputs the calculated sum to the decision unit 102.

[0935] For example, in the case of 22 pieces of gain control positioninformation GCR shown in FIG. 119, codes with numbers of bits such asthose shown in FIG. 119 are generated as a result of encoding, and thusthe total number of bits of the codes becomes equal to 48. Thus, asignal indicating that the total number of bits is equal to 48 is outputto the decision unit 102.

[0936] If the conventional fixed-length (5-bit) encoding method wereemployed, the gain control position information GC in the example shownin FIG. 119 would be encoded into codes with a total of 110 (=5×22)bits. Thus, the total number of bits of encoded data according to thepresent invention is smaller by 62 than that according to theconventional technique. In the encoding tables (FIGS. 120 and 121)employed in the present example, some values are encoded using escapecodes. Alternatively, specific codes corresponding to respective valuesmay be defined in the table for all values.

[0937] In the present example, the difference value WC2 is assumed tohave such a characteristic shown in FIG. 117. In a case in which thecharacteristic of the difference value WC2 varies from one encoding unitAi to another, the coding table may be switched depending on thecharacteristic of the difference value WC2.

[0938] The encoding method employed by the encoder 101-13 is described.

[0939] As described earlier with reference to FIG. 90, the differencevalue VC2 obtained by subtracting gain control position informationGCi-1 of a lower frequency band immediately adjacent to gain controlposition information GCi from the gain control position information GCihas a high probability of becoming equal to a particular value.

[0940] Furthermore, in the case of stereo audio signals, as describedearlier with reference to FIG. 108, the difference value WC1 obtained bysubtracting gain control position information GCLi from gain controlposition information GCRi in the same frequency band has a highprobability of becoming equal to a particular value.

[0941] Therefore, the difference value WC3 obtained by subtracting thedifference value VC2 of the gain control position information GCLi fromthe difference value VC2 of the gain control position information GCRihas a high probability of taking a particular value (0 or a value whoseabsolute value is close to 0), as shown in FIG. 122.

[0942] In view of the above, the encoder 101-13 encodes gain controlposition information GC such that either gain control positioninformation GCL0 to GCL11 or gain control position information GCR0 toGCR11, and codes with small numbers of bits are assigned to differencevalues WC3 having high occurrence probabilities.

[0943] The operation of the encoder 101-13 is described below withreference to a flow chart shown in FIG. 123. Herein, it is assumed thatthe encoder 101-13 encodes gain control position information GCR.

[0944] In step S391, the encoder 101-13 detects gain control positioninformation GCLi in one frequency band from gain control information GL0to GL11 of the input left-channel signal and also detects gain controlposition information GCRi in the same frequency band from gain controlinformation GR0 to GR11 of the input right-channel signal.

[0945] The encoder 101-13 then determines the difference value VC2 ofthe gain control position information GCLi by subtracting, from the gaincontrol position information GCLi, the gain control position informationGCLi-1 of the encoding unit Ai-1 which is in a lower frequency bandadjacent to the frequency band of the encoding unit Ai and which wasdetected in previous execution of step S391.

[0946] The encoder 101-13 also determines the difference value VC2 ofthe gain control position information GCRi by subtracting, from the gaincontrol position information GCRi, the gain control position informationGCRi-1 of the encoding unit Ai-1 and which was detected in previousexecution of step S391.

[0947] For example, in the case of gain control position informationGCL3 of gain control position information GCL0 to GCL11 shown in FIG.124, the difference value VC2 of first gain control position informationGCL3 is given by a value (=−1, not shown) obtained by subtracting firstgain control position information GCL2 (=8) from the first gain controlposition information GCL3 (=7), and the difference value VC2 of secondgain control position information GCL3 is given by a value (=11, notshown) obtained by subtracting second gain control position informationGCL2 (=10) from the second gain control position information GCL3 (=21).

[0948] Furthermore, in the case of gain control position informationGCR3 of gain control position information GCR0 to GCR11 shown in FIG.124, the difference value VC2 of first gain control position informationGCR3 is given by a value (=−1, not shown) obtained by subtracting firstgain control position information GCR2 (=8) from the first gain controlposition information GCR3 (=7), and the difference value VC2 of secondgain control position information GCR3 is given by a value (=13, notshown) obtained by subtracting second gain control position informationGCR2 (=10) from the second gain control position information GCR3 (=23).

[0949] In the next step S392, the encoder 101-13 determines thedifference value WC3 by subtracting the difference value VC2 of the gaincontrol position information GCLi from the difference value VC2 of thegain control position information GCRi.

[0950] Hereinafter, for simplicity, the difference value WC3 obtained bysubtracting the difference value VC2 of the gain control positioninformation GCLi from the difference value VC2 of the gain controlposition information GCRi will be referred to simply as the differencevalue WC3 of the gain control position information GCRi.

[0951] For example, in the case of gain control position informationGCL3 and gain control position information GCR3 in the example shown inFIG. 124, the difference value WC3 of first gain control positioninformation GCR3 is given by a value (=0) obtained by subtracting thedifference value VC2 (=−1) of first gain control position informationGCL3 (=7) from the difference value VC2 (=−1) of the first gain controlposition information GCR3 (=7), and the difference value WC3 of secondgain control position information GCR3 is given by a value (=2) obtainedby subtracting the difference value VC2 (=11) of second gain controlposition information GCL3 (=21) from the difference value VC2 (=13) ofthe second gain control position information GCR3 (=23).

[0952] In step S393, the encoder 101-13 determines whether the gaincontrol position information GCRi indicates the position of an attackportion AT or a release portion RE, in a similar manner to the encoder101-2. In a case in which the gain control position information GCRiindicates the position of an attack portion AT, the encoder 101-13retrieves a code corresponding to the difference value WC3 of the gaincontrol position information GCRi from a table shown in FIG. 125 andemploys the retrieved code as the code for the gain control positioninformation GCRi.

[0953] For example, in the case of first gain control positioninformation GCR3 (=7) of gain control position information GCR3 in theexample shown in FIG. 124, the first gain control position informationGCR3 indicates the position of an attack portion AT and the differencevalue WC3 thereof is equal to 0, and thus a 1-bit code “0” is employedas the code of the first gain control position information GCR3.

[0954] On the other hand, in a case in which the gain control positioninformation GCRi indicates the position of a release portion RE, a codecorresponding to the difference value WC3 of the gain control positioninformation GCRi is retrieved from a table shown in FIG. 126 and theretrieved code is employed as the code of the gain control positioninformation GCRi.

[0955] For example, in the case of second gain control positioninformation GCR3 (=23) of the gain control position information GCR3 inthe example shown in FIG. 124, the second gain control positioninformation GCR3 indicates the position of a release portion RE and thedifference value WC3 thereof is equal to 2, and thus a 2-bit code “110”is employed as the code of the second gain control position informationGCR3.

[0956] In the table shown in FIG. 125, a 1-bit code “0” is assigned to avalue of 0. Furthermore, in the table shown in FIG. 125, a procedure ofdetermining a code for a value other 0 is defined (more specifically,the code is given by a formula 1+original value). According to thisprocedure, a 5-bit code is given by a combination of a 1-bit code “1”and a following 5-bit code indicating the gain control positioninformation GC (original value, the gain control position informationGCR in this specific case).

[0957] In the table shown in FIG. 126, a 1-bit code “0” is assigned to avalue of 0 and a 2-bit code “10” is assigned to a value of 2.Furthermore, in the table shown in FIG. 126, a procedure of determininga code for a value other 0 and 2 is defined (more specifically, the codeis given by a formula 11+original value). According to this procedure, a7-bit code is given by a combination of a 2-bit code “11” and afollowing 5-bit code indicating the gain control position information GC(original value, the gain control position information GCR in thisspecific case).

[0958] In the next step S394, the encoder 101-13 determines whethercodes have been determined for all gain control position informationGCR0 to GCR11, that is, whether all gain control position informationGCR0 to GCR11 have been encoded. If it is determined that all pieces ofgain control position information GCRi have not been encoded, theprocess returns to step S391 to perform the step S391 and followingsteps to encode next unencoded gain control position information GCRi.

[0959] If it is determined in step S394 that all gain control positioninformation GCR0 to GCR11 have been encoded, the process proceeds tostep S395. In step S395, the encoder 101-13 outputs the codes determinedin step S393 for the respective gain control position information GCR0to GCR11 to the terminal connected to the switch 103.

[0960] In step S396, the encoder 101-13 calculates the sum of thenumbers of bits of the encoded gain control position information GCR0 toGCR11 and outputs the calculated sum to the decision unit 102.

[0961] For example, in the case of 22 pieces of gain control positioninformation GCR shown in FIG. 124, codes with numbers of bits such asthose shown in FIG. 124 are generated as a result of encoding, and thusa signal indicating that the total number of bits is equal to 50 isoutput to the decision unit 102.

[0962] If the conventional fixed-length (5-bit) encoding method wereemployed, the gain control position information GCR in the example shownin FIG. 124 would be encoded into codes with a total of 110 (=5×22)bits. Thus, in this example, the total number of bits of encoded dataaccording to the present invention is smaller by 60 than that accordingto the conventional technique.

[0963] In the encoding tables (FIGS. 125 and 126) employed in thepresent example, some values are encoded using escape codes.Alternatively, specific codes corresponding to respective values may bedefined in the table for all values.

[0964] In the present example, the difference value WC3 is assumed tohave such a characteristic shown in FIG. 122. In a case in which thecharacteristic of the difference value WC3 varies from one encoding unitAi to another, the coding table may be switched depending on thecharacteristic of the difference value WC3.

[0965] In addition to above-described various methods employed by thegain control position information encoder 73 to encode the gain controlposition information, there may be provided an additional encoder forencoding the gain control number into a code with a fixed bit lengthaccording to the conventional technique.

[0966]FIG. 127 shows an example of a construction of a decodingapparatus 151 according to the present invention. In addition to theparts employed in the decoding apparatus 2 shown in FIG. 5, the encodingapparatus 151 further includes gain control information decoder 161. Theother parts are similar to those of the decoding apparatus 2 shown inFIG. 5 and thus they are not described in further detail herein.

[0967] The demultiplexer 31 processes encoded data so as to separate itinto decoded normalized coefficients B0 to B11, decoded quantizationstep size information D0 to D11, decoded quantized coefficients F0 toF11, codes into which gain control information G0 to G11 have beenencoded (hereinafter, such codes will be referred to as encoded gaincontrol information GX), and information indicating the encoding methodapplied to the gain control information G (hereinafter, referred to asgain control information encoding information GY).

[0968] The separated normalized coefficients B0 to B11, quantizationstep size information D0 to D11, and quantized coefficients F0 to F11are supplied to corresponding dequantizers/denormalizers 32-1 to 32-12from the demultiplexer 31, while the encoded gain control information GXand the gain control information encoding information GY are supplied tothe gain control information decoder 161.

[0969] The dequantizer/denormalizer 32 dequantizes the quantizedcoefficients F by employing a quantization step size corresponding tothat indicated by the quantization step size information D andmultiplies the normalized data C obtained via the dequantization by avalue corresponding to the normalized coefficient B (therebydenormalizing the normalized data C. The signal obtained as a result ofthe above process is supplied to the inverse spectrum converter 33.

[0970]FIG. 128 shows the construction of the gain control informationdecoder 161, in which the encoded gain control information GX and thegain control information encoding information GY received from thedemultiplexer 31 are applied to a gain control number decoder 171, again control amount information decoder 172, and a gain control positioninformation decoder 173 of the gain control information decoder 161.

[0971] The gain control number decoder 171 decodes the encoded gaincontrol number GAX included in the input encoded gain controlinformation GX in accordance with the gain control number encodinginformation GAY included in the input gain control information encodinginformation GY. That is, the gain control number decoder 171 performsdecoding corresponding to the encoding performed on the gain controlnumber GA by the encoder 51. The gain control numbers GA0 to GA11obtained via the decoding process are supplied to inverse spectrumconverters 33-1 to 33-12, respectively, in synchronization withrespective gain control amount information GB0 to GB11 output from thegain control amount information decoder 172 and respective gain controlposition information GC0 to GC11 output from the gain control positioninformation decoder 173.

[0972] The gain control amount information decoder 172 decodes theencoded gain control amount information GBX included in the inputencoded gain control information GX in accordance with the gain controlamount information encoding information GBY included in the input gaincontrol information encoding information GY. That is, the gain controlamount information decoder 172 performs decoding corresponding to theencoding performed on the gain control amount information GB by theencoder 51. The gain control amount information GB0 to GB11 obtained viathe decoding process are supplied to inverse spectrum converters 33-1 to33-12, respectively, in synchronization with respective gain controlnumbers GA0 to GA11 output from the gain control number decoder 171 andrespective gain control position information GC0 to GC11 output from thegain control position information decoder 173.

[0973] The gain control position information decoder 173 decodes theencoded gain control position information GCX included in the inputencoded gain control information GX in accordance with the input gaincontrol position information encoding information GCY included in theinput gain control information encoding information GY. That is, thegain control position information decoder 173 performs decodingcorresponding to the encoding performed on the gain control positioninformation GC by the encoder 51. The gain control position informationGC0 to GC11 obtained via the decoding process are supplied to inversespectrum converters 33-1 to 33-12, respectively, in synchronization withrespective gain control numbers GA0 to GA11 output from the gain controlnumber decoder 171 and respective gain control amount information GB0 toGB11 output from the gain control amount information decoder 172.

[0974] Referring again to FIG. 127, the inverse spectrum converter 33performs an inverse spectrum conversion which is an inverse process ofthe spectrum conversion performed in the encoding apparatus 51.

[0975] Furthermore, the inverse spectrum converter 33 performs a gaincontrol adjustment on the signal obtained as the result of the inversespectrum conversion in accordance with the gain control information Greceived from the gain control information decoder 161. An encoding unitA obtained as the result is output to a band combiner 34.

[0976] The band combiner 34 combines the encoding units A received fromthe inverse spectrum converter 33 such that overlapped sample data ofthe block are interfered with each other, thereby reconstructing anaudio signal.

[0977]FIG. 129 shows an example of a construction of the gain controlnumber decoder 171. Although in the present example, the gain controlnumber decoder 171 includes nine decoders 181-1 to 181-8, the number ofdecoders is not limited to eight, but the gain control number decoder171 may include an arbitrary plural number. of decoders 181.

[0978] The encoded gain control information GX is input to the eightdecoders 181-1 to 181-8, as required. In the respective decoders 181-1to 181-8, the encoded gain control number GAX included in the inputencoded gain control information GX is subjected to decoding processescorresponding to the encoding processes performed by the respectiveencoders 81-1 to 81-8 (FIG. 9) of the gain control number encoder 71(FIG. 8) of the gain control information encoder 61 in the encodingapparatus 51. The decoded results are output from terminals connected toa switch 184.

[0979] A decision unit 182 detects, from the gain control numberencoding information GAY included in the input gain control informationencoding information GY, encoding information associated with theencoded gain control number GAX (more specifically, detects which one ofencoders 81 encoded the gain control number GAX or detects which tablewas used in the encoding of the gain control number GAX). In accordancewith the detected encoding information, the decision unit 182 selects adecoder 181 to be used in decoding.

[0980] The decision unit 182 controls the switch 183 so that the encodedgain control information GX is input to the selected decoder 181 andalso controls the switch 184 so that the output from the selecteddecoder 181 is properly supplied to inverse spectrum converters 33.

[0981]FIG. 130 shows an example of a construction of the gain controlamount information decoder 172. Although in the present example, thegain control amount information decoder 172 includes twelve decoders191-1 to 191-12, the number of decoders is not limited to twelve, butthe gain control amount information decoder 172 may include an arbitraryplural number of decoders 191.

[0982] The encoded gain control information GX is input to the twelvedecoders 191-1 to 191-12, as required. In the respective decoders 191-1to 191-12, the encoded gain control amount information GBX included inthe input encoded gain control information GX is subjected to decodingprocesses corresponding to the encoding processes performed by therespective encoders 91-1 to 91-12 (FIG. 35) of the gain control amountinformation encoder 72 of the gain control information encoder 61 in theencoding apparatus 51. The decoded results are output from terminalsconnected to a switch 194.

[0983] A decision unit 192 detects, from the gain control amountinformation encoding information GBY included in the input gain controlinformation encoding information GY, encoding information associatedwith the encoded gain control amount information GBX (more specifically,detects which one of encoders 91 encoded the gain control amountinformation GBX or detects which table was used in the encoding of thegain control amount information GBX In accordance with the detectedencoding information, the decision unit 192 selects a decoder 191 to beused in decoding.

[0984] The decision unit 192 controls the switch 193 so that the encodedgain control information GX is input to the selected decoder 191 andalso controls the switch 194 so that the output from the selecteddecoder 191 is properly supplied to inverse spectrum converters 33.

[0985]FIG. 131 shows an example of a construction of the gain controlposition information decoder 173. Although in the present example, thegain control position information decoder 173 includes twelve decoders201-1 to 201-12, the number of decoders is not limited to twelve, butthe gain control position information decoder 173 may include anarbitrary plural number of decoders 201.

[0986] The encoded gain control information GX is input to the twelvedecoders 201-1 to 201-12, as required. In the respective decoders 201-1to 201-12, the encoded gain control position information GCX included inthe input encoded gain control information GX is subjected to decodingprocesses corresponding to the encoding processes performed by therespective encoders 101-1 to 101-12 (FIG. 76) of the gain controlposition information encoder 73 of the gain control information encoder61 in the encoding apparatus 51. The decoded results are output fromterminals connected to a switch 204.

[0987] A decision unit 202 detects, from the gain control positioninformation encoding information GCY included in the input gain controlinformation encoding information GY, encoding information associatedwith the encoded gain control position information GCX (morespecifically, detects which one of encoders 101 encoded the gain controlposition information GCX or detects which table was used in the encodingof the gain control position information GCX). In accordance with thedetected encoding information, the decision unit 202 selects a decoder201 to be used in decoding.

[0988] The decision unit 202 controls the switch 203 so that the encodedgain control information GX is input to the selected decoder 201 andalso controls the switch 204 so that the output from the selecteddecoder 201 is properly supplied to inverse spectrum converters 33.

[0989]FIG. 132 shows another example of a construction of the encodingapparatus 51. In addition to the parts employed in the encodingapparatus 51 shown in FIG. 7, the encoding apparatus 51 further includesa normalized coefficient encoder 251 and a quantization step sizeinformation encoder 252.

[0990] The normalizers 13-1 to 13-12 detect a signal component having agreatest absolute value from the spectral component signals S0 to S11every unit of time and normalize the spectral component signals S0 toS11 by employing relative values of coefficients with respect to thedetected greatest value as the normalized spectral component signals B0to B11.

[0991] The quantizers 13-1 to 13-12 supply the normalized data C0 to C11obtained by normalizing the spectral component signals S0 to S11 torespective quantizers 15-1 to 15-12 corresponding to the respectivebands, and supply the calculated normalized coefficients B0 to B11 tothe normalized coefficient encoder 251.

[0992] On the basis of the spectral component signals S0 to S11 receivedfrom the spectrum converters 12-1 to 12-12, a quantization step sizesetting unit 14 determines quantization step sizes to be used inquantization of the normalized data C0 to C11, and outputs quantizationstep size information D0 to D11 indicating the determined quantizationstep sizes to the corresponding quantizers 15-1 to 15-12 and also to thequantization step size information encoder 252.

[0993] The normalized coefficient encoder 251 encodes the normalizedcoefficients B0 to B11 received from the normalizers 13-1 to 13-12 bymeans of various different encoding methods. The normalized coefficientencoder 251 detects encoded normalized coefficients B0 to B11 which havebeen encoded into the least number of bits of those encoded by means ofvarious difference encoding methods, and the normalized coefficientencoder 251 outputs the detected encoded normalized coefficients B0 toB11 to the multiplexer 16.

[0994] The quantization step size information encoder 252 encodes thequantization step size information D0 to D11 received from thequantization step size setting unit 14 by means of various differentencoding methods. The quantization step size information encoder 252detects encoded quantization step size information D0 to D11 which havebeen encoded into the least number of bits of those encoded by means ofvarious difference encoding methods, and the normalized coefficientencoder 251 outputs the detected encoded quantization step sizeinformation D0 to D11 to the multiplexer 16.

[0995] That is, in the present example, not only the gain controlinformation G but also the normalized coefficient B and the quantizationstep size information D are encoded into variable-length codes tofurther improve encoding efficiency associated with the quantizedcoefficient F.

[0996]FIG. 133 shows an example of a construction of a decodingapparatus 151 for decoding the encoded data generated by the encodingapparatus 51 shown in FIG. 132. This decoding apparatus 151 furtherincludes a normalized coefficient decoder 351 and a quantization stepsize information decoder 352 in addition to the parts employed in thedecoding apparatus 151 shown in FIG. 127.

[0997] The demultiplexer 31 decodes encoded data and separates thedecoded data into encoded gain control information G0 to G11 (encodedgain control information GX), information indicating the encoding methodapplied to the gain control information G (gain control informationencoding information GY), encoded normalized coefficients B0 to B11(hereinafter, referred to simply as encoded normalized coefficients),information indicating the encoding method applied to the normalizedcoefficients B (hereinafter, referred to as normalized coefficientencoding information), encoded quantization step size information D0 toD11 (hereinafter, referred to as encoded quantization step sizeinformation, information indicating the encoding method applied to thequantization step size information D (hereinafter, referred to asquantization step size information encoding information), and decodedquantized coefficients F0 to F11.

[0998] The demultiplexer 31 outputs the encoded gain control informationGX and the gain control information encoding information GY to the gaincontrol information decoder 161, the encoded normalized coefficients andthe encoded normalized coefficient encoding information to a normalizedcoefficient decoder 351, and the encoded quantization step sizeinformation and the quantization step size information encodinginformation to a quantization step size information decoder 352.

[0999] The demultiplexer 31 also outputs the respective quantizedcoefficients F0 to F11 to corresponding dequantizers/denormalizers 32-1to 32-14.

[1000] The normalized coefficient decoder 351 decodes the encodednormalized coefficients received from the demultiplexer 31, by adecoding method corresponding to the normalized coefficient encodinginformation, that is, a decoding method corresponding to the encodingmethod employed by the normalized coefficient encoder 251 of theencoding apparatus 51 in the encoding of the normalized coefficient B.The resultant decoded normalized coefficients B0 to B11 are respectivelyoutput to the corresponding dequantizers/denormalizers 32-1 to 32-12.

[1001] The quantization step size information decoder 352 decodes theencoded quantization step size information received from thedemultiplexer 31 by a decoding method corresponding to the quantizationstep size information encoding information, that is, by the decodingmethod corresponding to the encoding method employed by the quantizationstep size information encoder 252 of the encoding apparatus 51 in theencoding of the quantization step size information D. The resultantdecoded quantization step size information D0 to D11 are respectivelyoutput to the corresponding dequantizers/denormalizers 32-1 to 32-12.

[1002] The process described above may be performed by hardware orsoftware. In the case in which the processes are performed by software,a software program is installed on a computer, and the computer executesthe program so as to realize the functions of the encoding apparatus 51or the decoding apparatus 151 described above.

[1003]FIG. 134 is a block diagram showing a construction of a computer501 used to realize the functions of the encoding apparatus 51 or thedecoding apparatus 151 described above. An input/output interface 516 isconnected to a CPU (Central Processing Unit) 511 via a bus 515. If theCPU 511 receives, via the input/output interface 516, a command issuedby a user using an input unit 518 including a keyboard, a mouse, or thelike, the CPU 511 loads a program into a RAM (Random Access Memory) 513from a ROM (Random Only Memory) 512, a hard disk 514, or a removablestorage medium such as a magnetic disk 531, an optical disk 532, amagnetooptical disk 533, or a semiconductor memory 534 mounted on adrive 520 and executes the loaded program thereby performing variousprocesses described above. The CPU 511 outputs the result of theprocess, as required, to an output unit 517 such as an LCD (LiquidCrystal Display) via the input/output interface 516. The program may besupplied to users in various manners. For example, the program may bestored in advance in the hard disk 514 or the ROM 512 and the programmay be supplied to users together with the computer 501, or the programmay be supplied in the form of a package medium such as a magnetic disk531, an optical disk 532, a magnetooptical disk 533, or a semiconductormemory 534. The program may also be downloaded onto the hard disk 514via a communication unit 519 and via a satellite or a network.

[1004] In the present description, the steps described in the programstored in the storage medium may be performed either in time sequence inaccordance with the order described in the program or in a parallel orseparate fashion.

INDUSTRIAL APPLICABILITY

[1005] The present invention makes it possible to achieve an improvementin encoding efficiency.

1. An encoding apparatus for encoding an acoustic time series signalsuch that the acoustic time series signal is split into band signals inpredetermined bands and gain adjustment is made on the band signals, ata gain control position by a gain control amount, for each of as manypositions as indicated by a gain control number, said encoding apparatuscomprising: detection means for detecting a gain control number of afirst arbitrary band signal of the band signals and a gain controlnumber of a second band signal in a band adjacent to the band of thefirst band signal; calculation means for calculating the differencevalue between first gain control number detected by the detection meansfrom the first band signal and second gain control number detected bythe detection means from the second band signal; retaining means forretaining a table indicating a value-code correspondence in which a codewith a small number of bits is assigned to a value having a highprobability of being obtained as the result of the calculation of thedifference value performed by the calculation means; gain control numberencoding means for encoding the first gain control number such that acode corresponding to the difference value calculated by the calculationmeans is retrieved from the table and the retrieved code is employed asthe code of the first gain control number; gain control amountinformation encoding means for encoding gain control amount informationindicating a particular value corresponding to the gain control amount;and gain control position information encoding means for encoding gaincontrol position information indicating a particular value correspondingto the gain control position.
 2. An encoding apparatus according toclaim 1, wherein the table indicating the difference value versus codecorrespondence includes only one or more difference values having highprobabilities of being obtained as the result of the calculationperformed by the calculation means; and in a case in which thecorrespondence of the calculated difference value is not indicated bythe table, the gain control number encoding means encodes an escape codeand the first gain control number.
 3. An encoding method for an encodingapparatus to encode an acoustic time series signal such that theacoustic time series signal is split into band signals in predeterminedbands and gain adjustment is made on the band signals, at a gain controlposition by a gain control amount, for each of as many positions asindicated by a gain control number, said encoding method comprising: adetection step of detecting a gain control number of a first arbitraryband signal of the band signals and a gain control number of a secondband signal in a band adjacent to the band of the first band signal; acalculation step of calculating the difference value between first gaincontrol number detected in the detection step from the first band signaland second gain control number detected in the detection step from thesecond band signal; a retaining step of retaining a table indicating avalue-code correspondence in which a code with a small number of bits isassigned to a value having a high probability of being obtained as theresult of the calculation of the difference value performed in thecalculation step; a gain control number encoding step of encoding thefirst gain control number such that a code corresponding to thedifference value calculated in the calculation step is retrieved fromthe table and the retrieved code is employed as the code of the firstgain control number; a gain control amount information encoding step ofencoding gain control amount information indicating a particular valuecorresponding to the gain control amount; and a gain control positioninformation encoding step of encoding gain control position informationindicating a particular value corresponding to the gain controlposition.
 4. An encoding apparatus for encoding an acoustic time seriessignal such that the acoustic time series signal is split into bandsignals in predetermined bands and gain adjustment is made on the bandsignals, at a gain control position by a gain control amount, for eachof as many positions as indicated by a gain control number, saidencoding apparatus comprising: detection means for detecting a gaincontrol number of a first arbitrary band signal of the band signals anda gain control number of a second band signal in a band adjacent to theband of the first band signal; determination means for determiningwhether a first gain control number detected by the detection means fromthe first band signal and a second gain control number detected by thedetection means from the second band signal are equal to each other;gain control number encoding means for performing encoding such that ifthe determination made by the determination means is affirmative, only aflag indicating that the first and second gain control numbers are equalto each other is encoded, while, if the determination made by thedetermination means is negative, both a flag indicating that the firstand second gain control numbers are not equal to each other and thesecond gain control number are encoded; gain control amount informationencoding means for encoding gain control amount information indicating aparticular value corresponding to the gain control amount; and gaincontrol position information encoding means for encoding gain controlposition information indicating a particular value corresponding to thegain control position.
 5. An encoding method for an encoding apparatusto encode an acoustic time series signal such that the acoustic timeseries signal is split into band signals in predetermined bands and gainadjustment is made on the band signals, at a gain control position by again control amount, for each of as many positions as indicated by again control number, said encoding method comprising: a detection stepof detecting a gain control number of a first arbitrary band signal ofthe band signals and a gain control number of a second band signal in aband adjacent to the band of the first band signal; a determination stepof determining whether the first gain control number detected in thedetection step from the first band signal is equal to the second gaincontrol number detected in the detection step from the second bandsignal; a gain control number encoding step of performing encoding suchthat if the determination made in the determination step is affirmative,only a flag indicating that the first and second gain control numbersare equal to each other is encoded, while, if the determination made inthe determination step is negative, both a flag indicating that thefirst and second gain control numbers are not equal to each other andthe second gain control number are encoded; a gain control amountinformation encoding step of encoding gain control amount informationindicating a particular value corresponding to the gain control amount;and a gain control position information encoding step of encoding gaincontrol position information indicating a particular value correspondingto the gain control position.
 6. An encoding apparatus for encoding anacoustic time series signal such that the acoustic time series signal issplit into band signals in predetermined bands and gain adjustment ismade on the band signals, at a gain control position by a gain controlamount, for each of as many positions as indicated by a gain controlnumber, said encoding apparatus comprising: detection means fordetecting gain control numbers of the band signals; calculation meansfor calculating a smallest number of bits which can represent thedifference between the maximum and minimum values of the gain controlnumbers detected by the detection means; gain control number encodingmeans for encoding the gain control number such that the minimum valuedetermined by the calculation means is encoded, a value obtained bysubtracting the minimum value from the gain control number detected bythe detection means is expressed by as many bits as the smallest numberof bits calculate by the calculation means, and a resultant expressionis employed as the code of the gain control number; gain control amountinformation encoding means for encoding gain control amount informationindicating a particular value corresponding to the gain control amount;and gain control position information encoding means for encoding gaincontrol position information indicating a particular value correspondingto the gain control position.
 7. An encoding method for an encodingapparatus to encode an acoustic time series signal such that theacoustic time series signal is split into band signals in predeterminedbands and gain adjustment is made on the band signals, at a gain controlposition by a gain control amount, for each of as many positions asindicated by a gain control number, said encoding method comprising: adetection step of detecting gain control numbers of the band signals; acalculation step of calculating a smallest number of bits which canrepresent the difference between the maximum and minimum values of thegain control numbers detected in the detection step; a gain controlnumber encoding step for encoding the gain control number such that theminimum value determined in the calculation step is encoded, a valueobtained by subtracting the minimum value from the gain control numberdetected in the detection step is expressed by as many bits as thesmallest number of bits calculated in the calculation step, and aresultant expression is employed as the code of the gain control number;a gain control amount information encoding step of encoding gain controlamount information indicating a particular value corresponding to thegain control amount; and a gain control position information encodingstep of encoding gain control position information indicating aparticular value corresponding to the gain control position.
 8. Anencoding apparatus for encoding a stereo audio signal such that aleft-channel signal and a right-channel signal of the stereo audiosignal are respectively split into band signals of left andright-channel signals in predetermined bands and gain adjustment is madeon the band signals, at a gain control position by a gain controlamount, for each of as many positions as indicated by a gain controlnumber, said encoding apparatus comprising: detection means fordetecting a gain control number of an arbitrary band signal of theleft-channel signal and a gain control number of a band signal of theright-channel signal in the same band as that of the band signal of theleft-channel signal; calculation means for calculating the differencevalue between first gain control number detected by the detection meansfrom the band signal of the left-channel signal and second gain controlnumber detected by the detection means from the band signal of theright-channel signal; retaining means for retaining a table indicating avalue-code correspondence in which a code with a small number of bits isassigned to a value having a high probability of being obtained as theresult of the calculation of the difference value performed by thecalculation means; gain control number encoding means for encoding thefirst or second gain control number such that a code corresponding tothe difference value calculated by the calculation means is retrievedfrom the table and the retrieved code is employed as the code of thefirst or second gain control number; gain control amount informationencoding means for encoding gain control amount information indicating aparticular value corresponding to the gain control amount; and gaincontrol position information encoding means for encoding gain controlposition information indicating a particular value corresponding to thegain control position.
 9. An encoding apparatus according to claim 8,wherein the table indicating the difference value versus codecorrespondence includes only one or more difference values having highprobabilities of being obtained as the result of the calculationperformed by the calculation means; and in a case in which thecorrespondence of the calculated difference value is not indicated bythe table, the gain control number encoding means encodes an escape codeand the first gain control number.
 10. An encoding method for anencoding apparatus to encode a stereo audio signal such that aleft-channel signal and a right-channel signal of the stereo audiosignal are respectively split into band signals of left andright-channel signals in predetermined bands and gain adjustment is madeon the band signals, at a gain control position by a gain controlamount, for each of as many positions as indicated by a gain controlnumber, said encoding method comprising: a detection step of detecting again control number of an arbitrary band signal of the left-channelsignal and a gain control number of a band signal of the right-channelsignal in the same band as that of the band signal of the left-channelsignal; a calculation step of calculating the difference value betweenfirst gain control number detected in the detection step from the bandsignal of the left-channel signal and second gain control numberdetected in the detection step from the band signal of the right-channelsignal; a retaining step of retaining a table indicating a value-codecorrespondence in which a code with a small number of bits is assignedto a value having a high probability of being obtained as the result ofthe calculation of the difference value performed in the calculationstep; a gain control number encoding step of encoding the first orsecond gain control number such that a code corresponding to thedifference value calculated in the calculation step is retrieved fromthe table and the retrieved code is employed as the code of the first orsecond gain control number; a gain control amount information encodingstep of encoding gain control amount information indicating a particularvalue corresponding to the gain control amount; and a gain controlposition information encoding step of encoding gain control positioninformation indicating a particular value corresponding to the gaincontrol position.
 11. An encoding apparatus for encoding a stereo audiosignal such that a left-channel signal and a right-channel signal of thestereo audio signal are respectively split into band signals of left andright-channel signals in predetermined bands and gain adjustment is madeon the band signals, at a gain control position by a gain controlamount, for each of as many positions as indicated by a gain controlnumber, said encoding apparatus comprising: detection means fordetecting a gain control number of an arbitrary band signal of theleft-channel signal and a gain control number of a band signal of theright-channel signal in the same band as that of the band signal of theleft-channel signal; determination means for determining whether a firstgain control number detected by the detection means from a band signalof the left-channel signal and a second gain control number detected bythe detection means from a band signal of the right-channel signal areequal to each other; gain control number encoding means for performingencoding such that if the determination made by the determination meansis affirmative, a flag indicating that the first and second gain controlnumbers are equal to each other and the first or second gain controlnumber are encoded, while, if the determination made by thedetermination means is negative, a flag indicating that the first andsecond gain control numbers are not equal to each other and the secondand gain control numbers are encoded; gain control amount informationencoding means for encoding gain control amount information indicating aparticular value corresponding to the gain control amount; and gaincontrol position information encoding means for encoding gain controlposition information indicating a particular value corresponding to thegain control position.
 12. An encoding method for an encoding apparatusto encode a stereo audio signal such that a left-channel signal and aright-channel signal of the stereo audio signal are respectively splitinto band signals of left and right-channel signals in predeterminedbands and gain adjustment is made on the band signals, at a gain controlposition by a gain control amount, for each of as many positions asindicated by a gain control number, said encoding method comprising: adetection step of detecting a gain control number of an arbitrary bandsignal of the left-channel signal and a gain control number of a bandsignal of the right-channel signal in the same band as that of the bandsignal of the left-channel signal; a determination step of determiningwhether the first gain control number detected in the detection stepfrom the band signal of the left-channel signal is equal to the secondgain control number detected in the detection step from the band signalof the right-channel signal; a gain control number encoding step ofperforming encoding such that if the determination made in thedetermination step is affirmative, a flag indicating that the first andsecond gain control numbers are equal to each other and the first orsecond gain control number are encoded, while, if the determination madein the determination means is negative, a flag indicating that the firstand second gain control numbers are not equal to each other and thesecond and gain control numbers are encoded; a gain control amountinformation encoding step of encoding gain control amount informationindicating a particular value corresponding to the gain control amount;and a gain control position information encoding step of encoding gaincontrol position information indicating a particular value correspondingto the gain control position.
 13. An encoding apparatus for encoding astereo audio signal such that a left-channel signal and a right-channelsignal of the stereo audio signal are respectively split into bandsignals of left and right-channel signals in predetermined bands andgain adjustment is made on the band signals, at a gain control positionby a gain control amount, for each of as many positions as indicated bya gain control number, said encoding apparatus comprising: detectionmeans for detecting gain control numbers of band signals of theleft-channel signal and gain control numbers of band signals of theright-channel signal; determination means for determining whether firstgain control numbers detected by the detection means from the bandsignals of the left-channel signal and second gain control numbersdetected by the detection means from the corresponding band signals ofthe right-channel signal are equal to each other for all bands; gaincontrol number encoding means for performing encoding such that if thedetermination made by the determination means is affirmative, the firstor second gain control numbers are encoded, while, if the determinationmade by the determination means is negative, the first and second gaincontrol numbers are encoded; gain control amount information encodingmeans for encoding gain control amount information indicating aparticular value corresponding to the gain control amount; and gaincontrol position information encoding means for encoding gain controlposition information indicating a particular value corresponding to thegain control position.
 14. An encoding method for an encoding apparatusto encode a stereo audio signal such that a left-channel signal and aright-channel signal of the stereo audio signal are respectively splitinto band signals of left and right-channel signals in predeterminedbands and gain adjustment is made on the band signals, at a gain controlposition by a gain control amount, for each of as many positions asindicated by a gain control number, said encoding method comprising: adetection step of detecting a gain control number of a band signal ofthe left-channel signal and a gain control number of a band signal ofthe right-channel signal; a determination step of determining whetherfirst gain control numbers detected in the detection step from the bandsignals of the left-channel signal and second gain control numbersdetected in the detection step from the corresponding band signals ofthe right-channel signal are equal to each other for all bands; a gaincontrol number encoding step of performing encoding such that if thedetermination made in the determination step is affirmative, the firstor second gain control numbers are encoded, while, if the determinationmade in the determination step is negative, the first and second gaincontrol numbers are encoded; a gain control amount information encodingstep of encoding gain control amount information indicating a particularvalue corresponding to the gain control amount; and a gain controlposition information encoding step of encoding gain control positioninformation indicating a particular value corresponding to the gaincontrol position.
 15. An encoding apparatus for encoding a stereo audiosignal such that a left-channel signal and a right-channel signal of thestereo audio signal are respectively split into band signals of left andright-channel signals in predetermined bands and gain adjustment is madeon the band signals, at a gain control position by a gain controlamount, for each of as many positions as indicated by a gain controlnumber, said encoding apparatus comprising: detection means fordetecting gain control numbers of an arbitrary first band signal, asecond band signal, a third band signal, and a fourth band signal,respectively, the first band signal and the second band signal being ofband signals of a left-channel signal, the second band signal being of aband adjacent to a band of the first band signal, the third band signaland the fourth band signal being of band signals of a right-channelsignal, the third band signal corresponding to the first band signal,the fourth band signal corresponding to the second band signal; firstcalculation means for calculating the difference value between firstgain control number detected by the detection means from the first bandsignal and second gain control number detected by the detection meansfrom the second band signal; second calculation means for calculatingthe difference value between third gain control number detected from thethird band signal and fourth gain control number detected from thefourth band signal; third calculation means for calculating thedifference value between the difference value calculated by the firstcalculation means and the difference value calculated by the secondcalculation means; retaining means for retaining a table indicating avalue-code correspondence in which a code with a small number of bits isassigned to a value having a high probability of being obtained as theresult of the calculation of the difference value performed by the thirdcalculation means; gain control number encoding means for encoding thefirst gain control number such that a code corresponding to thedifference value calculated by the calculation means is retrieved fromthe table and the retrieved code is employed as the code of the firstgain control number; gain control amount information encoding means forencoding gain control amount information indicating a particular valuecorresponding to the gain control amount; and gain control positioninformation encoding means for encoding gain control positioninformation indicating a particular value corresponding to the gaincontrol position.
 16. An encoding apparatus according to claim 15,wherein the table indicating the difference value versus codecorrespondence includes only one or more difference values having highprobabilities of being obtained as the result of the calculationperformed by the third calculation means; and in a case in which thecorrespondence of the calculated difference value is not indicated bythe table, the gain control number encoding means encodes an escape codeand the first gain control number.
 17. An encoding method for anencoding apparatus to encode a stereo audio signal such that aleft-channel signal and a right-channel signal of the stereo audiosignal are respectively split into band signals of left andright-channel signals in predetermined bands and gain adjustment is madeon the band signals, at a gain control position by a gain controlamount, for each of as many positions as indicated by a gain controlnumber, said encoding method comprising: a detection step for detectinggain control numbers of an arbitrary first band signal, a second bandsignal, a third band signal, and a fourth band signal, respectively, thefirst band signal and the second band signal being of band signals of aleft-channel signal, the second band signal being of a band adjacent toa band of the first band signal, the third band signal and the fourthband signal being of band signals of a right-channel signal, the thirdband signal corresponding to the first band signal, the fourth bandsignal corresponding to the second band signal; a first calculation stepof calculating the difference value between a first gain control numberdetected in the detection step from the first band signal and a secondgain control number detected in the detection step from the second bandsignal; a second calculation step of calculating the difference valuebetween a third gain control number detected from the third band signaland a fourth gain control number detected from the fourth band signal; athird calculation step of calculating the difference value between thedifference value calculated in the first calculation step and thedifference value calculated in the second calculation step; a retainingstep of retaining a table indicating a value-code correspondence inwhich a code with a small number of bits is assigned to a value having ahigh probability of being obtained as the result of the calculation ofthe difference value performed in the third calculation step; a gaincontrol number encoding step of encoding the first gain control numbersuch that a code corresponding to the difference value calculated in thethird calculation step is retrieved from the table and the retrievedcode is employed as the code of the first gain control number; a gaincontrol amount information encoding step of encoding gain control amountinformation indicating a particular value corresponding to the gaincontrol amount; and a gain control position information encoding step ofencoding gain control position information indicating a particular valuecorresponding to the gain control position.
 18. An encoding apparatusfor encoding an acoustic time series signal such that the acoustic timeseries signal is split into band signals in predetermined bands and gainadjustment is made on the band signals, at a gain control position by again control amount, for each of as many positions as indicated by again control number, said encoding apparatus comprising: detection meansfor detecting gain control amount information indicating a particularvalue corresponding to a gain control amount of a band signal;calculation means for calculating the difference value between arbitraryfirst gain control amount information of one or more pieces of gaincontrol amount information detected by the detection means from one ofthe band signals and gain control amount information corresponding to again control amount of gain adjustment performed on a part adjacent to apart subjected to gain adjustment performed according to the gaincontrol amount corresponding to the first gain control amountinformation; retaining means for retaining a table indicating avalue-code correspondence in which a code with a small number of bits isassigned to a value having a high probability of being obtained as theresult of the calculation of the difference value performed by thecalculation means; gain control amount information encoding means forencoding the first gain control amount information by retrieving a codeassigned to the difference value calculated by the calculation meansfrom the table and employing the retrieved code as an code of the firstgain control amount information; gain control number encoding means forencoding the gain control number; and gain control position informationencoding means for encoding gain control position information indicatinga particular value corresponding to the gain control position.
 19. Theencoding apparatus of claim 18, wherein the table indicates thecorrespondence of only one or more difference values having highprobabilities of being obtained as the result of the calculationperformed by the calculation means; and in a case in which thecorrespondence of the calculated difference value is not indicated bythe table, the gain control amount information encoding means encodes anescape code and the first gain control amount information.
 20. Anencoding method for an encoding apparatus to encode an acoustic timeseries signal such that the acoustic time series signal is split intoband signals in predetermined bands and gain adjustment is made on theband signals, at a gain control position by a gain control amount, foreach of as many positions as indicated by a gain control number, saidencoding method comprising: a detection step of detecting gain controlamount information indicating a particular value corresponding to a gaincontrol amount of a band signal; a calculation step of calculating thedifference value between arbitrary first gain control amount informationof one or more pieces of gain control amount information detected in thedetection step from one of the band signals and gain control amountinformation corresponding to a gain control amount of gain adjustmentperformed on a part adjacent to a part subjected to gain adjustmentperformed according to the gain control amount corresponding to thefirst gain control amount information; a retaining step of retaining atable indicating a value-code correspondence in which a code with asmall number of bits is assigned to a value having a high probability ofbeing obtained as the result of the calculation of the difference valueperformed in the calculation step; a gain control amount informationencoding step of encoding the first gain control amount information suchthat a code corresponding to the difference value calculated in thecalculation step is retrieved from the table and the retrieved code isemployed as the code of the first gain control amount information; again control number encoding step of encoding the gain control number; again control position information encoding step of encoding gain controlposition information indicating a particular value corresponding to thegain control position.
 21. An encoding apparatus for encoding anacoustic time series signal such that the acoustic time series signal issplit into band signals in predetermined bands and gain adjustment ismade on the band signals, at a gain control position by a gain controlamount, for each of as many positions as indicated by a gain controlnumber, said encoding apparatus comprising: detection means fordetecting gain control amount information indicating a valuecorresponding to a gain control amount of a first arbitrary band signalof the band signals and detecting gain control amount informationindicating a value corresponding to a gain control amount of a secondband signal in a band adjacent to the band of the first band signal;calculation means for calculating the difference value between firstgain control amount information detected by the detection means from thefirst band signal and second gain control amount information detected bythe detection means from the second band signal; retaining means forretaining a table indicating a value-code correspondence in which a codewith a small number of bits is assigned to a value having a highprobability of being obtained as the result of the calculation of thedifference value performed by the calculation means; gain control amountinformation encoding means for encoding the first gain control amountinformation such that a code corresponding to the difference valuecalculated by the calculation means is retrieved from the table and theretrieved code is employed as the code of the first gain control amountinformation; gain control number encoding means for encoding the gaincontrol number; and gain control position information encoding means forencoding gain control position information indicating a particular valuecorresponding to the gain control position.
 22. An encoding apparatusaccording to claim 21, wherein the table indicating the difference valueversus code correspondence includes only one or more difference valueshaving high probabilities of being obtained as the result of thecalculation performed by the calculation means; and in a case in whichthe correspondence of the calculated difference value is not indicatedby the table, the gain control amount information encoding means encodesan escape code and the gain control amount information.
 23. An encodingmethod for an encoding apparatus to encode an acoustic time seriessignal such that the acoustic time series signal is split into bandsignals in predetermined bands and gain adjustment is made on the bandsignals, at a gain control position by a gain control amount, for eachof as many positions as indicated by a gain control number, saidencoding method comprising: a detection step of detecting gain controlamount information indicating a value corresponding to a gain controlamount of a first arbitrary band signal of the band signals anddetecting gain control amount information indicating a valuecorresponding to a gain control amount of a second band signal in a bandadjacent to the band of the first band signal; a calculation step ofcalculating the difference value between first gain control amountinformation detected in the detection step from the first band signaland second gain control amount information detected in the detectionstep from the second band signal; a retaining step of retaining a tableindicating a value-code correspondence in which a code with a smallnumber of bits is assigned to a value having a high probability of beingobtained as the result of the calculation of the difference valueperformed in the calculation step; a gain control amount informationencoding step of encoding the first gain control amount information suchthat a code corresponding to the difference value calculated in thecalculation step is retrieved from the table and the retrieved code isemployed as the code of the first gain control amount information; again control number encoding step of encoding the gain control number;and a gain control position information encoding step of encoding gaincontrol position information indicating a particular value correspondingto the gain control position.
 24. An encoding apparatus for encoding anacoustic time series signal such that the acoustic time series signal issplit into band signals in predetermined bands and gain adjustment ismade on the band signals, at a gain control position by a gain controlamount, for each of as many positions as indicated by a gain controlnumber, said encoding apparatus comprising: detection means fordetecting gain control amount information indicating a valuecorresponding to a gain control amount of a first arbitrary band signalof the band signals and detecting gain control amount informationindicating a value corresponding to a gain control amount of a secondband signal in a band adjacent to the band of the first band signal;first calculation means for calculating the first difference valuebetween arbitrary first gain control amount information of one or morepieces of gain control amount information detected by the detectionmeans from the first band signal and gain control amount informationcorresponding to a gain control amount of gain adjustment performed on apart adjacent to a part subjected to gain adjustment performed accordingto the gain control amount corresponding to the first gain controlamount information and also calculating the second difference valuebetween third gain control amount information corresponding to the firstgain control amount information and fourth gain control amountinformation corresponding to the second gain control amount information,the third gain control amount information and the fourth gain controlamount information having been detected from the second band signal;second calculation means for calculating the third difference valuebetween the first difference value and the second difference value;retaining means for retaining a table indicating a value-codecorrespondence in which a code with a small number of bits is assignedto a value having a high probability of being obtained as the thirddifference value in the calculation performed by the second calculationmeans; gain control amount information encoding means for encoding thefirst gain control amount information such that a code corresponding tothe third difference value calculated by the second calculation means isretrieved from the table and the retrieved code is employed as the codeof the first gain control amount information; gain control numberencoding means for encoding the gain control number; and gain controlposition information encoding means for encoding gain control positioninformation indicating a particular value corresponding to the gaincontrol position.
 25. An encoding apparatus according to claim 24,wherein the table indicating the difference value versus codecorrespondence may include only one or more difference values havinghigh probabilities of being obtained as the result of the calculation ofthe third difference value performed by the calculation means; and in acase in which the correspondence of the calculated third differencevalue is not indicated by the table, the gain control amount informationencoding means encodes an escape code and the first gain control amountinformation.
 26. An encoding method for an encoding apparatus to encodean acoustic time series signal such that the acoustic time series signalis split into band signals in predetermined bands and gain adjustment ismade on the band signals, at a gain control position by a gain controlamount, for each of as many positions as indicated by a gain controlnumber, said encoding method comprising: a detection step of detectinggain control amount information indicating a value corresponding to again control amount of a first arbitrary band signal of the band signalsand detecting gain control amount information indicating a valuecorresponding to a gain control amount of a second band signal in a bandadjacent to the band of the first band signal; a first calculation stepfor calculating the first difference value between arbitrary first gaincontrol amount information of one or more pieces of gain control amountinformation detected in the detection step from the first band signaland gain control amount information corresponding to a gain controlamount of gain adjustment performed on a part adjacent to a partsubjected to gain adjustment performed according to the gain controlamount corresponding to the first gain control amount information andalso calculating the second difference value between third gain controlamount information corresponding to the first gain control amountinformation and fourth gain control amount information corresponding tothe second gain control amount information, the third gain controlamount information and the fourth gain control amount information havingbeen detected from the second band signal; a second calculation step ofcalculating the third difference value between the first differencevalue and the second difference value; a retaining step of retaining atable indicating a value-code correspondence in which a code with asmall number of bits is assigned to a value having a high probability ofbeing obtained as the third difference value in the calculationperformed in the second calculation step; a gain control amountinformation encoding step of encoding the first gain control amountinformation such that a code corresponding to the third difference valuecalculated in the second calculation step is retrieved from the tableand the retrieved code is employed as the code of the first gain controlamount information; a gain control number encoding step of encoding thegain control number; and a gain control position information encodingstep of encoding gain control position information indicating aparticular value corresponding to the gain control position.
 27. Anencoding apparatus for encoding an acoustic time series signal such thatthe acoustic time series signal is split into band signals inpredetermined bands and gain adjustment is made on the band signals, ata gain control position by a gain control amount, for each of as manypositions as indicated by a gain control number, said encoding apparatuscomprising: detection means for detecting gain control amountinformation indicating a value corresponding to gain control amountinformation of a first arbitrary band signal of the band signals anddetecting gain control amount information indicating a valuecorresponding to gain control amount information of a second band signalin a band adjacent to the band of the first band signal; determinationmeans for determining whether first gain control amount informationdetected by the detection means from the first band signal and secondgain control amount information detected from the second band signal areequal to each other; gain control amount information encoding means forperforming encoding such that if the determination made by thedetermination means is affirmative, only a flag indicating that thefirst gain control amount information and second gain control amountinformation are equal to each other is encoded, while, if thedetermination made by the determination means is negative, both a flag,indicating that the first gain control amount information and secondgain control amount information are not equal to each other, and thesecond gain control amount information are encoded; gain control numberencoding means for encoding the gain control number; and gain controlposition information encoding means for encoding gain control positioninformation indicating a particular value corresponding to the gaincontrol position.
 28. An encoding method for an encoding apparatus toencode an acoustic time series signal such that the acoustic time seriessignal is split into band signals in predetermined bands and gainadjustment is made on the band signals, at a gain control position by again control amount, for each of as many positions as indicated by again control number, said encoding method comprising: a detection stepof detecting gain control amount information indicating a valuecorresponding to gain control amount information of a first arbitraryband signal of the band signals and detecting gain control amountinformation indicating a value corresponding to gain control amountinformation of a second band signal in a band adjacent to the band ofthe first band signal; a determination step of determining whether thefirst gain control amount information detected in the detection stepfrom the first band signal is equal to the second gain control amountinformation detected in the detection step from the second band signal;a gain control amount information encoding step of performing encodingsuch that if the determination made in the determination step isaffirmative, only a flag indicating that the first gain control amountinformation and second gain control amount information are equal to eachother is encoded, while, if the determination made in the determinationstep is negative, both a flag, indicating that the first gain controlamount information and second gain control amount information are notequal to each other, and the second gain control amount information areencoded; a gain control number encoding step of encoding the gaincontrol number; and a gain control position information encoding step ofencoding gain control position information indicating a particular valuecorresponding to the gain control position.
 29. An encoding apparatusfor encoding an acoustic time series signal such that the acoustic timeseries signal is split into band signals in predetermined bands and gainadjustment is made on the band signals, at a gain control position by again control amount, for each of as many positions as indicated by again control number, said encoding apparatus comprising: detection meansfor detecting gain control amount information indicating a particularvalue corresponding to a gain control amount of a band signal;calculation means for calculating a smallest number of bits which canrepresent the difference between the maximum and minimum values of thegain control amount information detected by the detection means; gaincontrol amount information encoding means for encoding the gain controlamount information such that the minimum value determined by thecalculation means is encoded, a value obtained by subtracting theminimum value from the gain control amount information detected by thedetection means is expressed by as many bits as the number of bitscalculate by the calculation means, and a resultant expression isemployed as the code of the gain control amount information; gaincontrol number encoding means for encoding the gain control number; andgain control position information encoding means for encoding gaincontrol position information indicating a particular value correspondingto the gain control position.
 30. An encoding apparatus according toclaim 29, wherein the calculation means calculates a smallest number ofbits which can represent the difference between the maximum and minimumvalues of one or more pieces of gain control amount information detectedby the detection means from one band signal; and the gain control amountinformation encoding means encodes the gain control amount informationsuch that values obtained by subtracting the minimum value from the oneor more pieces of gain control amount information are expressed by asmany bits as the number of bits calculate by the calculation means andresultant expressions are employed as the codes of the one or morepieces of gain control amount information.
 31. An encoding method for anencoding apparatus to encode an acoustic time series signal such thatthe acoustic time series signal is split into band signals inpredetermined bands and gain adjustment is made on the band signals, ata gain control position by a gain control amount, for each of as manypositions as indicated by a gain control number, said encoding methodcomprising: a detection step of detecting gain control amountinformation indicating a particular value corresponding to a gaincontrol amount of a band signal; a calculation step of calculating asmallest number of bits which can represent the difference between themaximum and minimum values of the gain control amount informationdetected in the detection step; a gain control amount informationencoding step for encoding the gain control amount information such thatthe minimum value determined in the calculation step is encoded, a valueobtained by subtracting the minimum value from the gain control amountinformation detected in the detection step is expressed by as many bitsas the number of bits calculated in the calculation step, and aresultant expression is employed as the code of the gain control amountinformation; a gain control number encoding step of encoding the gaincontrol number; and a gain control position information encoding step ofencoding gain control position information indicating a particular valuecorresponding to the gain control position.
 32. An encoding apparatusfor encoding a stereo audio signal such that a left-channel signal and aright-channel signal of the stereo audio signal are respectively splitinto band signals of left and right-channel signals in predeterminedbands and gain adjustment is made on the band signals, at a gain controlposition by a gain control amount, for each of as many positions asindicated by a gain control number, said encoding apparatus comprising:detection means for detecting gain control amount information indicatinga particular value corresponding to a gain control amount of a bandsignal of a left-channel signal and that of a band signal of aright-channel signal in the same band as that of the band signal of theleft-channel signal; calculation means for calculating the differencevalue between first gain control amount information detected by thedetection means from the band signal of the left-channel signal andsecond gain control amount information detected by the detection meansfrom the band signal of the right-channel signal; retaining means forretaining a table indicating a value-code correspondence in which a codewith a small number of bits is assigned to a value having a highprobability of being obtained as the result of the calculation of thedifference value performed by the calculation means; gain control amountinformation encoding means for encoding the first or second gain controlamount information such that a code corresponding to the differencevalue calculated by the calculation means is retrieved from the tableand the retrieved code is employed as the code of the first or secondgain control amount information; gain control number encoding means forencoding the gain control number; and gain control position informationencoding means for encoding gain control position information indicatinga particular value corresponding to the gain control position.
 33. Anencoding apparatus according to claim 32, wherein the table indicatingthe difference value versus code correspondence includes only one ormore difference values having high probabilities of being obtained asthe result of the calculation performed by the calculation means; and ina case in which the correspondence of the calculated difference value isnot indicated by the table, the gain control amount information encodingmeans encodes an escape code and the gain control amount information.34. An encoding method for an encoding apparatus to encode a stereoaudio signal such that a left-channel signal and a right-channel signalof the stereo audio signal are respectively split into band signals ofleft and right-channel signals in predetermined bands and gainadjustment is made on the band signals, at a gain control position by again control amount, for each of as many positions as indicated by again control number, said encoding method comprising: a detection stepof detecting gain control amount information indicating a particularvalue corresponding to a gain control amount of a band signal of aleft-channel signal and that of a band signal of a right-channel signalin the same band as that of the band signal of the left-channel signal;a calculation step of calculating the difference value between firstgain control amount information detected in the detection step from theband signal of the left-channel signal and the second gain controlamount information detected in the detection step from the band signalof the right-channel signal; a retaining step of retaining a tableindicating a value-code correspondence in which a code with a smallnumber of bits is assigned to a value having a high probability of beingobtained as the result of the calculation of the difference valueperformed in the calculation step; a gain control amount informationencoding step of encoding the first or second gain control amountinformation such that a code corresponding to the difference valuecalculated in the calculation step is retrieved from the table and theretrieved code is employed as the code of the first or second gaincontrol amount information; a gain control number encoding step ofencoding the gain control number; and a gain control positioninformation encoding step of encoding gain control position informationindicating a particular value corresponding to the gain controlposition.
 35. An encoding apparatus for encoding a stereo audio signalsuch that a left-channel signal and a right-channel signal of the stereoaudio signal are respectively split into band signals of left andright-channel signals in predetermined bands and gain adjustment is madeon the band signals, at a gain control position by a gain controlamount, for each of as many positions as indicated by a gain controlnumber, said encoding apparatus comprising: detection means fordetecting gain control amount information indicating a particular valuecorresponding to a gain control amount of an arbitrary band signal of aleft-channel signal and that of a band signal of a right-channel signalin the same band as that of the band signal of the left-channel signal;determination means for determining whether gain control amountinformation detected by the detection means from a band signal of theleft-channel signal and second gain control amount information detectedby the detection means from a band signal of the right-channel signalare equal to each other; gain control amount information encoding meansfor performing encoding such that if the determination made by thedetermination means is affirmative, a flag indicating that the firstgain control amount information and the second gain control amountinformation are equal to each other and the first or second gain controlamount information are encoded, while, if the determination made by thedetermination means is negative, a flag indicating that the first gaincontrol amount information and the second gain control amountinformation are not equal to each other, the first gain control amountinformation, and the second and gain control amount information areencoded; gain control number encoding means for encoding the gaincontrol number; and gain control position information encoding means forencoding gain control position information indicating a particular valuecorresponding to the gain control position.
 36. An encoding method foran encoding apparatus to encode a stereo audio signal such that aleft-channel signal and a right-channel signal of the stereo audiosignal are respectively split into band signals of left andright-channel signals in predetermined bands and gain adjustment is madeon the band signals, at a gain control position by a gain controlamount, for each of as many positions as indicated by a gain controlnumber, said encoding method comprising: a detection step of detectinggain control amount information indicating a particular valuecorresponding to a gain control amount of an arbitrary band signal of aleft-channel signal and that of a band signal of a right-channel signalin the same band as that of the band signal of the left-channel signal;a determination step of determining whether the first gain controlamount information detected in the detection step from the band signalof the left-channel signal is equal to the second gain control amountinformation detected in the detection step from the band signal of theright-channel signal; a gain control amount information encoding step ofperforming encoding such that if the determination made in thedetermination step is affirmative, a flag indicating that the first gaincontrol amount information and the second gain control amountinformation are equal to each other and the first or second gain controlamount information are encoded, while, if the determination made in thedetermination step is negative, a flag indicating that the first gaincontrol amount information and the second gain control amountinformation are not equal to each other, the first gain control amountinformation, and the second and gain control amount information areencoded; a gain control number encoding step of encoding the gaincontrol number; and a gain control position information encoding step ofencoding gain control position information indicating a particular valuecorresponding to the gain control position.
 37. An encoding apparatusfor encoding a stereo audio signal such that a left-channel signal and aright-channel signal of the stereo audio signal are respectively splitinto band signals of left and right-channel signals in predeterminedbands and gain adjustment is made on the band signals, at a gain controlposition by a gain control amount, for each of as many positions asindicated by a gain control number, said encoding apparatus comprising:detection means for detecting gain control amount information indicatinga particular value corresponding to a gain control amount of a bandsignal of a left-channel signal and that of a band signal of aright-channel signal; determination means for determining whether gaincontrol amount information detected by the detection means from the bandsignals of the left-channel signal and gain control amount informationdetected by the detection means from the corresponding band signals ofthe right-channel signal are equal to each other for all bands; gaincontrol amount information encoding means for performing encoding suchthat if the determination made by the determination means isaffirmative, the first or second gain control amount information isencoded, while, if the determination made by the determination means isnegative, the first gain control amount information and the second gaincontrol amount information are encoded; gain control number encodingmeans for encoding the gain control number; and gain control positioninformation encoding means for encoding gain control positioninformation indicating a particular value corresponding to the gaincontrol position.
 38. An encoding method for an encoding apparatus toencode a stereo audio signal such that a left-channel signal and aright-channel signal of the stereo audio signal are respectively splitinto band signals of left and right-channel signals in predeterminedbands and gain adjustment is made on the band signals, at a gain controlposition by a gain control amount, for each of as many positions asindicated by a gain control number, said encoding method comprising:detection step for detecting gain control amount information indicatinga particular value corresponding to a gain control amount of a bandsignal of a left-channel signal and that of a band signal of aright-channel signal; a determination step of determining whether gaincontrol amount information detected in the detection step from the bandsignals of the left-channel signal and gain control amount informationdetected in the detection step from the band signals of theright-channel signal are equal to each other in each of all bands; again control amount information encoding step of performing encodingsuch that if the determination made in the determination step isaffirmative, the first or second gain control amount information isencoded, while, if the determination made in the determination step isnegative, the first gain control amount information and the second gaincontrol amount information are encoded; a gain control number encodingstep of encoding the gain control number; and a gain control positioninformation encoding step of encoding gain control position informationindicating a particular value corresponding to the gain controlposition.
 39. An encoding apparatus for encoding a stereo audio signalsuch that a left-channel signal and a right-channel signal of the stereoaudio signal are respectively split into band signals of left andright-channel signals in predetermined bands and gain adjustment is madeon the band signals, at a gain control position by a gain controlamount, for each of as many positions as indicated by a gain controlnumber, said encoding apparatus comprising: detection means fordetecting gain control amount information indicating a particular valuecorresponding to a gain control amount of an arbitrary band signal of aleft-channel signal and that of a band signal of a right-channel signalin the same band as that of the band signal of the left-channel signal;first calculation means for calculating the first difference valuebetween arbitrary first gain control amount information of one or morepieces of gain control amount information detected by the detectionmeans from the band signal of the left-channel signal and gain controlamount information corresponding to a gain control amount of gainadjustment performed on a part adjacent to a part subjected to gainadjustment performed according to the gain control amount correspondingto the first gain control amount information and also calculating thesecond difference value between third and fourth gain control amountinformation of one or more pieces of gain control amount informationdetected from the band signal of the right-channel signal, the thirdgain control amount information and the fourth gain control amountinformation corresponding to the first gain control amount informationand the second gain control amount information, respectively; secondcalculation means for calculating the third difference value between thefirst difference value and the second difference value; retaining meansfor retaining a table indicating a value-code correspondence in which acode with a small number of bits is assigned to a value having a highprobability of being obtained as the third difference value in thecalculation performed by the second calculation means; gain controlamount information encoding means for encoding the first gain controlamount information such that a code corresponding to the thirddifference value calculated by the second calculation means is retrievedfrom the table and the retrieved code is employed as the code of thefirst gain control amount information; gain control number encodingmeans for encoding the gain control number; and gain control positioninformation encoding means for encoding gain control positioninformation indicating a particular value corresponding to the gaincontrol position.
 40. An encoding apparatus according to claim 39,wherein the table indicating the difference value versus codecorrespondence includes only one or more difference values having highprobabilities of being obtained as the result of the calculationperformed by the calculation means; and in a case in which thecorrespondence of the calculated third difference value is not indicatedby the table, the gain control amount information encoding means encodesan escape code and the first gain control amount information.
 41. Anencoding method for an encoding apparatus to encode a stereo audiosignal such that a left-channel signal and a right-channel signal of thestereo audio signal are respectively split into band signals of left andright-channel signals in predetermined bands and gain adjustment is madeon the band signals, at a gain control position by a gain controlamount, for each of as many positions as indicated by a gain controlnumber, said encoding method comprising: a detection step of detectinggain control amount information indicating a particular valuecorresponding to a gain control amount of an arbitrary band signal of aleft-channel signal and that of a band signal of a right-channel signalin the same band as that of the band signal of the left-channel signal;a first calculation step for calculating the first difference valuebetween arbitrary first gain control amount information of one or morepieces of gain control amount information detected in the detection stepfrom the band signal of the left-channel signal and gain control amountinformation corresponding to a gain control amount of gain adjustmentperformed on a part adjacent to a part subjected to gain adjustmentperformed according to the gain control amount corresponding to thefirst gain control amount information and also calculating the seconddifference value between third and fourth gain control amountinformation of one or more pieces of gain control amount informationdetected from the band signal of the right-channel signal, the thirdgain control amount information and the fourth gain control amountinformation corresponding to the first gain control amount informationand the second gain control amount information, respectively; a secondcalculation step of calculating the third difference value between thefirst difference value and the second difference value; a retaining stepof retaining a table indicating a value-code correspondence in which acode with a small number of bits is assigned to a value having a highprobability of being obtained as the third difference value in thecalculation performed in the second calculation step; a gain controlamount information encoding step of encoding the first gain controlamount information such that a code corresponding to the thirddifference value calculated in the second calculation step is retrievedfrom the table and the retrieved code is employed as the code of thefirst gain control amount information; a gain control number encodingstep of encoding the gain control number; and a gain control positioninformation encoding step of encoding gain control position informationindicating a particular value corresponding to the gain controlposition.
 42. An encoding apparatus for encoding a stereo audio signalsuch that a left-channel signal and a right-channel signal of the stereoaudio signal are respectively split into band signals of left andright-channel signals in predetermined bands and gain adjustment is madeon the band signals, at a gain control position by a gain controlamount, for each of as many positions as indicated by a gain controlnumber, said encoding apparatus comprising: detection means fordetecting gain control amount information indicating valuescorresponding to gain control amounts of an arbitrary first band signal,a second band signal, a third band signal, and a fourth band signal,respectively, the first band signal and the second band signal being ofband signals of a left-channel signal, the second band signal being of aband adjacent to a band of the first band signal, the third band signaland the fourth band signal being of band signals of a right-channelsignal, the third band signal corresponding to the first band signal,the fourth band signal corresponding to the second band signal; firstcalculation means for calculating the difference value between firstgain control amount information detected by the detection means from thefirst band signal and second gain control amount information detected bythe detection means from the second band signal; second calculationmeans for calculating the difference value between third gain controlamount information detected from the third band signal and fourth gaincontrol amount information detected from the fourth band signal; thirdcalculation means for calculating the difference value between thedifference value calculated by the first calculation means and thedifference value calculated by the second calculation means; retainingmeans for retaining a table indicating a value-code correspondence inwhich a code with a small number of bits is assigned to a value having ahigh probability of being obtained as the result of the calculation ofthe difference value performed by the third calculation means; gaincontrol amount information encoding means for encoding the first gaincontrol amount information such that a code corresponding to thedifference value calculated by the third calculation means is retrievedfrom the table and the retrieved code is employed as the code of thefirst gain control amount information; gain control number encodingmeans for encoding the gain control number; and gain control positioninformation encoding means for encoding gain control positioninformation indicating a particular value corresponding to the gaincontrol position.
 43. An encoding apparatus according to claim 42,wherein the table indicating the difference value versus codecorrespondence includes only one or more difference values having highprobabilities of being obtained as the result of the calculationperformed by the third calculation means; and in a case in which thecorrespondence of the calculated difference value is not indicated bythe table, the gain control amount information encoding means encodes anescape code and the first gain control amount information.
 44. Anencoding method for an encoding apparatus to encode a stereo audiosignal such that a left-channel signal and a right-channel signal of thestereo audio signal are respectively split into band signals of left andright-channel signals in predetermined bands and gain adjustment is madeon the band signals, at a gain control position by a gain controlamount, for each of as many positions as indicated by a gain controlnumber, said encoding method comprising: a detection step of detectinggain control amount information indicating values corresponding to gaincontrol amounts of an arbitrary first band signal, a second band signal,a third band signal, and a fourth band signal, respectively, the firstband signal and the second band signal being of band signals of aleft-channel signal, the second band signal being of a band adjacent toa band of the first band signal, the third band signal and the fourthband signal being of band signals of a right-channel signal, the thirdband signal corresponding to the first band signal, the fourth bandsignal corresponding to the second band signal; a first calculation stepof calculating the difference value between first gain control amountinformation detected in the detection step from the first band signaland second gain control amount information detected in the detectionstep from the second band signal; a second calculation step ofcalculating the difference value between third gain control amountinformation detected from the third band signal and fourth gain controlamount information detected from the fourth band signal; a thirdcalculation step of calculating the difference value between thedifference value calculated in the first calculation step and thedifference value calculated in the second calculation step; a retainingstep of retaining a table indicating a value-code correspondence inwhich a code with a small number of bits is assigned to a value having ahigh probability of being obtained as the result of the calculation ofthe difference value performed in the third calculation step; a gaincontrol amount information encoding step of encoding the first gaincontrol amount information such that a code corresponding to thedifference value calculated in the third calculation step is retrievedfrom the table and the retrieved code is employed as the code of thefirst gain control amount information; a gain control number encodingstep of encoding the gain control number; and a gain control positioninformation encoding step of encoding gain control position informationindicating a particular value corresponding to the gain controlposition.
 45. An encoding apparatus for encoding an acoustic time seriessignal such that the acoustic time series signal is split into bandsignals in predetermined bands and gain adjustment is made on the bandsignals, at a gain control position by a gain control amount, for eachof as many positions as indicated by a gain control number, saidencoding apparatus comprising: detection means for detecting gaincontrol position information indicating a particular value correspondingto a gain control position of a band signal; gain control positioninformation encoding means for encoding gain control positioninformation such that a value represented by a particular number of bitsindicating the difference between first gain control positioninformation of one or more pieces of gain control position informationdetected by the detection means from one of the band signals and gaincontrol position information corresponding to a gain control position ofa part adjacent to a part indicated by a gain control positioncorresponding to the first gain control position information is employedas the code of the first gain control position information; gain controlnumber encoding means for encoding the gain control number; and gaincontrol amount information encoding means for encoding gain controlamount information indicating a particular value corresponding to thegain control amount.
 46. An encoding method for an encoding apparatus toencode an acoustic time series signal such that the acoustic time seriessignal is split into band signals in predetermined bands and gainadjustment is made on the band signals, at a gain control position by again control amount, for each of as many positions as indicated by again control number, said encoding method comprising: a detection step,of detecting gain control position information indicating a particularvalue corresponding to a gain control position of a band signal; a gaincontrol position information encoding step of encoding gain controlposition information such that a value represented by a particularnumber of bits indicating the difference between first gain controlposition information of one or more pieces of gain control positioninformation detected in the detection step from one of the band signalsand gain control position information corresponding to a gain controlposition of a part adjacent to a part indicated by a gain controlposition corresponding to the first gain control position information isemployed as the code of the first gain control position information; again control number encoding step of encoding the gain control number;and a gain control amount information encoding step of encoding gaincontrol amount information indicating a particular value correspondingto the gain control amount.
 47. An encoding apparatus for encoding anacoustic time series signal such that the acoustic time series signal issplit into band signals in predetermined bands and gain adjustment ismade on the band signals, at a gain control position by a gain controlamount, for each of as many positions as indicated by a gain controlnumber, said encoding apparatus comprising: detection means fordetecting gain control position information indicating a particularvalue corresponding to a gain control position of a band signal;calculation means for calculating the difference value between arbitraryfirst gain control position information of one or more pieces of gaincontrol position information detected by the detection means from one ofthe band signals and gain control position information corresponding tothe gain control position of a part adjacent to a part indicated by thegain control position corresponding to the first gain control positioninformation; retaining means for retaining a table indicating avalue-code correspondence in which a code with a small number of bits isassigned to a value having a high probability of being obtained as theresult of the calculation of the difference value performed by thecalculation means; gain control position information encoding means forencoding the first gain control position information such that a codecorresponding to the difference value calculated by the calculationmeans is retrieved from the table and the retrieved code is employed asthe code of the first gain control position information; gain controlnumber encoding means for encoding the gain control number; and gaincontrol amount information encoding means for encoding gain controlamount information indicating a particular value corresponding to thegain control amount.
 48. An encoding apparatus according to claim 47,wherein the table indicating the difference value versus codecorrespondence includes only one or more difference values having highprobabilities of being obtained as the result of the calculationperformed by the calculation means; and in a case in which thecorrespondence of the calculated difference value is not indicated bythe table, the gain control position information encoding means encodesan escape code and the first gain control position information.
 49. Anencoding apparatus according to claim 47, wherein the retaining meansretaining a first table indicating a value-code correspondence which isapplied when the first gain control position information indicates aposition of an attack portion and in which a code with a small number ofbits is assigned to a value having a high probability of being obtainedas the result of the calculation of the difference value performed bythe calculation means, and also retaining a second table indicating avalue-code correspondence which is applied when the first gain controlposition information indicates a position of a release portion and inwhich a code with a small number of bits is assigned to a value having ahigh probability of being obtained as the result of the calculation ofthe difference value performed by the calculation means; the firstencoding means performs encoding of the first gain control positioninformation such that when the first gain control position informationcorresponds to the position of an attack portion, a code correspondingto the difference value is retrieved from the first table and theretrieved code is employed as the code of the first gain controlposition information, while when the first gain control positioninformation corresponds to the position of a release portion, a codecorresponding to the difference value is retrieved from the second tableand the retrieved code is employed as the code of the first gain controlposition information.
 50. An encoding method for an encoding apparatusto encode an acoustic time series signal such that the acoustic timeseries signal is split into band signals in predetermined bands and gainadjustment is made on the band signals, at a gain control position by again control amount, for each of as many positions as indicated by again control number, said encoding method comprising: a detection step,of detecting gain control position information indicating a particularvalue corresponding to a gain control position of a band signal; acalculation step for calculating the difference value between arbitraryfirst gain control position information of one or more pieces of gaincontrol position information detected in the detection step from one ofthe band signals and gain control position information corresponding tothe gain control position of a part adjacent to a part indicated by thegain control position corresponding to the first gain control positioninformation; a retaining step of retaining a table indicating avalue-code correspondence in which a code with a small number of bits isassigned to a value having a high probability of being obtained as theresult of the calculation of the difference value performed in thecalculation step; a gain control position information encoding step ofencoding the first gain control position information such that a codecorresponding to the difference value calculated in the calculation stepis retrieved from the table and the retrieved code is employed as thecode of the first gain control position information; a gain controlnumber encoding step of encoding the gain control number; and a gaincontrol amount information encoding step of encoding gain control amountinformation indicating a particular value corresponding to the gaincontrol amount.
 51. An encoding apparatus for encoding an acoustic timeseries signal such that the acoustic time series signal is split intoband signals in predetermined bands and gain adjustment is made on theband signals, at a gain control position by a gain control amount, foreach of as many positions as indicated by a gain control number, saidencoding apparatus comprising: detection means for detecting a gaincontrol position information indicating a value corresponding to a gaincontrol position of a first arbitrary band signal of the band signalsand detecting gain control position information indicating a valuecorresponding to a gain control position of a second band signal in aband adjacent to the band of the first band signal; calculation meansfor calculating the difference value between the first gain controlposition information detected by the detection means from the first bandsignal and the second gain control position information detected by thedetection means from the second band signal; retaining means forretaining a table indicating a value-code correspondence in which a codewith a small number of bits is assigned to a value having a highprobability of being obtained as the result of the calculation of thedifference value performed by the calculation means; gain controlposition information encoding means for encoding the first gain controlposition information such that a code corresponding to the differencevalue calculated by the calculation means is retrieved from the tableand the retrieved code is employed as the code of the first gain controlposition information; gain control number encoding means for encodingthe gain control number; and gain control amount information encodingmeans for encoding gain control amount information indicating aparticular value corresponding to the gain control amount.
 52. Anencoding apparatus according to claim 51, wherein the table indicatingthe difference value versus code correspondence includes only one ormore difference values having high probabilities of being obtained asthe result of the calculation performed by the calculation means; and ina case in which the correspondence of the calculated difference value isnot indicated by the table, the gain control position informationencoding means encodes an escape code and the first gain controlposition information.
 53. An encoding apparatus according to claim 51,wherein the retaining means retaining a first table indicating avalue-code correspondence which is applied when the first gain controlposition information indicates a position of an attack portion and inwhich a code with a small number of bits is assigned to a value having ahigh probability of being obtained as the result of the calculation ofthe difference value performed by the calculation means, and alsoretaining a second table indicating a value-code correspondence which isapplied when the first gain control position information indicates aposition of a release portion and in which a code with a small number ofbits is assigned to a value having a high probability of being obtainedas the result of the calculation of the difference value performed bythe calculation means; the first encoding means performs encoding of thefirst gain control position information such that when the first gaincontrol position information corresponds to the position of an attackportion, a code corresponding to the difference value is retrieved fromthe first table and the retrieved code is employed as the code of thefirst gain control position information, while when the first gaincontrol position information corresponds to the position of a releaseportion, a code corresponding to the difference value is retrieved fromthe second table and the retrieved code is employed as the code of thefirst gain control position information.
 54. An encoding method for anencoding apparatus to encode an acoustic time series signal such thatthe acoustic time series signal is split into band signals inpredetermined bands and gain adjustment is made on the band signals, ata gain control position by a gain control amount, for each of as manypositions as indicated by a gain control number, said encoding methodcomprising: a detection step of detecting gain control positioninformation indicating a particular value corresponding to a gaincontrol position of a first arbitrary band signal of band signals andgain control position information indicating a particular valuecorresponding to a gain control position of a second band signal in aband adjacent to the band of the first band signal; a calculation stepof calculating the difference value between first gain control positioninformation detected in the detection step from the first band signaland second gain control position information detected in the detectionstep from the second band signal; a retaining step of retaining a tableindicating a value-code correspondence in which a code with a smallnumber of bits is assigned to a value having a high probability of beingobtained as the result of the calculation of the difference valueperformed in the calculation step; a gain control position informationencoding step of encoding the first gain control position informationsuch that a code corresponding to the difference value calculated in thecalculation step is retrieved from the table and the retrieved code isemployed as the code of the first gain control position information; again control number encoding step of encoding the gain control number;and a gain control amount information encoding step of encoding gaincontrol amount information indicating a particular value correspondingto the gain control amount.
 55. An encoding apparatus for encoding anacoustic time series signal such that the acoustic time series signal issplit into band signals in predetermined bands and gain adjustment ismade on the band signals, at a gain control position by a gain controlamount, for each of as many positions as indicated by a gain controlnumber, said encoding apparatus comprising: detection means fordetecting a gain control position information indicating a valuecorresponding to a gain control position of a first arbitrary bandsignal of the band signals and detecting gain control positioninformation indicating a value corresponding to a gain control positionof a second band signal in a band adjacent to the band of the first bandsignal; first calculation means for calculating the first differencevalue between arbitrary first gain control position information of oneor more pieces of gain control position information detected by thedetection means from the first band signal and gain control positioninformation corresponding to the gain control position of a partadjacent to a part indicated by the gain control position correspondingto the first gain control position information and also calculating thesecond difference value between third gain control position informationcorresponding to the first gain control position information and fourthgain control position information corresponding to the second gaincontrol position information, the third gain control positioninformation and the fourth gain control position information having beendetected from the second band signal; second calculation means forcalculating the third difference value between the first differencevalue and the second difference value; retaining means for retaining atable indicating a value-code correspondence in which a code with asmall number of bits is assigned to a value having a high probability ofbeing obtained as the third difference value in the calculationperformed by the second calculation means; gain control positioninformation encoding means for encoding the first gain control positioninformation such that a code corresponding to the third difference valuecalculated by the second calculation means is retrieved from the tableand the retrieved code is employed as the code of the first gain controlposition information; gain control number encoding means for encodingthe gain control number; and gain control amount information encodingmeans for encoding gain control amount information indicating aparticular value corresponding to the gain control amount.
 56. Anencoding apparatus according to claim 55, wherein the table indicatingthe difference value versus code correspondence may include only one ormore difference values having high probabilities of being obtained asthe result of the calculation of the third difference value performed bythe calculation means; and in a case in which the correspondence of thecalculated third difference value is not indicated by the table, thegain control position information encoding means encodes an escape codeand the first gain control position information.
 57. An encodingapparatus according to claim 55, wherein the retaining means retaining afirst table indicating a value-code correspondence which is applied whenthe first gain control position information indicates a position of anattack portion and in which a code with a small number of bits isassigned to a third difference value having a high probability of beingobtained as a result of the calculation performed by the secondcalculation means, and also retaining a second table indicating avalue-code correspondence which is applied when the first gain controlposition information indicates a position of a release portion and inwhich a code with a small number of bits is assigned to a thirddifference value having a high probability of being obtained as a resultof the calculation performed by the second calculation means; and thefirst encoding means performs encoding of the first gain controlposition information such that when the first gain control positioninformation corresponds to the position of an attack portion, a codecorresponding to the third difference value is retrieved from the firsttable and the retrieved code is employed as the code of the first gaincontrol position information, while when the first gain control positioninformation corresponds to the position of a release portion, a codecorresponding to the third difference value is retrieved from the secondtable and the retrieved code is employed as the code of the first gaincontrol position information.
 58. An encoding method for an encodingapparatus to encode an acoustic time series signal such that theacoustic time series signal is split into band signals in predeterminedbands and gain adjustment is made on the band signals, at a gain controlposition by a gain control amount, for each of as many positions asindicated by a gain control number, said encoding method comprising: adetection step of detecting gain control position information indicatinga particular value corresponding to a gain control position of a firstarbitrary band signal of band signals and gain control positioninformation indicating a particular value corresponding to a gaincontrol position of a second band signal in a band adjacent to the bandof the first band signal; a first calculation step of calculating thefirst difference value between arbitrary first gain control positioninformation of one or more pieces of gain control position informationdetected in the detection step from the first band signal and gaincontrol position information corresponding to the gain control positionof a part adjacent to a part indicated by the gain control positioncorresponding to the first gain control position information and alsocalculating the second difference value between third gain controlposition information corresponding to the first gain control positioninformation and fourth gain control position information correspondingto the second gain control position information, the third gain controlposition information and the fourth gain control position informationhaving been detected from the second band signal; a second calculationstep of calculating the third difference value between the firstdifference value and the second difference value; a retaining step ofretaining a table indicating a value-code correspondence in which a codewith a small number of bits is assigned to a value having a highprobability of being obtained as the third difference value in thecalculation performed in the second calculation step; a gain controlposition information encoding step of encoding the first gain controlposition information such that a code corresponding to the thirddifference value calculated in the second calculation step is retrievedfrom the table and the retrieved code is employed as the code of thefirst gain control position information; a gain control number encodingstep of encoding the gain control number; and a gain control amountinformation encoding step of encoding gain control amount informationindicating a particular value corresponding to the gain control amount.59. An encoding apparatus for encoding an acoustic time series signalsuch that the acoustic time series signal is split into band signals inpredetermined bands and gain adjustment is made on the band signals, ata gain control position by a gain control amount, for each of as manypositions as indicated by a gain control number, said encoding apparatuscomprising: detection means for detecting a gain control positioninformation indicating a value corresponding to a gain control positionof a first arbitrary band signal of the band signals and detecting gaincontrol position information indicating a value corresponding to a gaincontrol position information of a second band signal in a band adjacentto the band of the first band signal; determination means fordetermining whether first gain control position information detected bythe detection means from the first band signal and second gain controlposition information detected from the second band signal are equal toeach other; gain control position information encoding means forperforming encoding such that if the determination made by thedetermination means is affirmative, only a flag indicating that thefirst gain control position information and second gain control positioninformation are equal to each other is encoded, while, if thedetermination made by the determination means is negative, both a flag,indicating that the first gain control position information and secondgain control position information are not equal to each other, and thesecond gain control position information are encoded; gain controlnumber encoding means for encoding the gain control number; and gaincontrol amount information encoding means for encoding gain controlamount information indicating a particular value corresponding to thegain control amount.
 60. An encoding method for an encoding apparatus toencode an acoustic time series signal such that the acoustic time seriessignal is split into band signals in predetermined bands and gainadjustment is made on the band signals, at a gain control position by again control amount, for each of as many positions as indicated by again control number, said encoding method comprising: a detection stepof detecting gain control position information indicating a particularvalue corresponding to a gain control position of a first arbitrary bandsignal of band signals and gain control position information indicatinga particular value corresponding to gain control position information ofa second band signal in a band adjacent to the band of the first bandsignal; a determination step of determining whether the first gaincontrol position information detected in the detection step from thefirst band signal is equal to the second gain control positioninformation detected in the detection step from the second band signal;a gain control position information encoding step of performing encodingsuch that if the determination made in the determination step isaffirmative, only a flag indicating that the first gain control positioninformation and second gain control position information are equal toeach other is encoded, while, if the determination made in thedetermination step is negative, both a flag, indicating that the firstgain control position information and second gain control positioninformation are not equal to each other, and the second gain controlposition information are encoded; a gain control number encoding step ofencoding the gain control number; and a gain control amount informationencoding step of encoding gain control amount information indicating aparticular value corresponding to the gain control amount.
 61. Anencoding apparatus for encoding an acoustic time series signal such thatthe acoustic time series signal is split into band signals inpredetermined bands and gain adjustment is made on the band signals, ata gain control position by a gain control amount, for each of as manypositions as indicated by a gain control number, said encoding apparatuscomprising: detection means for detecting gain control positioninformation indicating a particular value corresponding to a gaincontrol position of a band signal; calculation means for calculating asmallest number of bits which can represent the difference between themaximum and minimum values of the gain control position informationdetected by the detection means; gain control position informationencoding means for encoding the gain control position information suchthat the minimum value determined by the calculation means is encoded, avalue obtained by subtracting the minimum value from the gain controlposition information detected by the detection means is expressed by asmany bits as the number of bits calculate by the calculation means, anda resultant expression is employed as the code of the gain controlposition information; gain control number encoding means for encodingthe gain control number; and gain control amount information encodingmeans for encoding gain control amount information indicating aparticular value corresponding to the gain control amount.
 62. Anencoding apparatus according to claim 61, wherein the calculation meanscalculates a smallest number of bits which can represent the differencebetween the maximum and minimum values of one or more pieces of gaincontrol position information detected by the detection means from oneband signal; and the gain control position information encoding meansencodes the gain control position information such that values obtainedby subtracting the minimum value from the one or more pieces of gaincontrol position information are expressed by as many bits as the numberof bits calculate by the calculation means and resultant expressions areemployed as the codes of the one or more pieces of gain control positioninformation.
 63. An encoding method for an encoding apparatus to encodean acoustic time series signal such that the acoustic time series signalis split into band signals in predetermined bands and gain adjustment ismade on the band signals, at a gain control position by a gain controlamount, for each of as many positions as indicated by a gain controlnumber, said encoding method comprising: a detection step, of detectinggain control position information indicating a particular valuecorresponding to a gain control position of a band signal; a calculationstep of calculating a smallest number of bits which can represent thedifference between the maximum and minimum values of the gain controlposition information detected in the detection step; a gain controlposition information encoding step for encoding the gain controlposition information such that the minimum value determined in thecalculation step is encoded, a value obtained by subtracting the minimumvalue from the gain control position information detected in thedetection step is expressed by as many bits as the number of bitscalculated in the calculation step, and a resultant expression isemployed as the code of the gain control position information; a gaincontrol number encoding step of encoding the gain control number; and again control amount information encoding step of encoding gain controlamount information indicating a particular value corresponding to thegain control amount.
 64. An encoding apparatus for encoding a stereoaudio signal such that a left-channel signal and a right-channel signalof the stereo audio signal are respectively split into band signals ofleft and right-channel signals in predetermined bands and gainadjustment is made on the band signals, at a gain control position by again control amount, for each of as many positions as indicated by again control number, said encoding apparatus comprising: detection meansfor detecting gain control position information indicating a particularvalue corresponding to a gain control position of an arbitrary bandsignal of a left-channel signal and that of a band signal of aright-channel signal in the same band as that of the band signal of theleft-channel signal; calculation means for calculating the differencevalue between the first gain control position information detected bythe detection means from the band signal of the left-channel signal andthe second gain control position information detected by the detectionmeans from the band signal of the right-channel signal; retaining meansfor retaining a table indicating a value-code correspondence in which acode with a small number of bits is assigned to a value having a highprobability of being obtained as the result of the calculation of thedifference value performed by the calculation means; gain controlposition information encoding means for encoding the first or secondgain control position information such that a code corresponding to thedifference value calculated by the calculation means is retrieved fromthe table and the retrieved code is employed as the code of the first orsecond gain control position information; gain control number encodingmeans for encoding the gain control number; and gain control amountinformation encoding means for encoding gain control amount informationindicating a particular value corresponding to the gain control amount.65. An encoding apparatus according to claim 64, wherein the tableindicating the difference value versus code correspondence includes onlyone or more difference values having high probabilities of beingobtained as the result of the calculation performed by the calculationmeans; and in a case in which the correspondence of the calculateddifference value is not indicated by the table, the gain controlposition information encoding means encodes an escape code and the gaincontrol position information.
 66. An encoding apparatus according toclaim 64, wherein the retaining means retaining a first table indicatinga value-code correspondence which is applied when the first gain controlposition information indicates a position of an attack portion and inwhich a code with a small number of bits is assigned to a value having ahigh probability of being obtained as the result of the calculation ofthe difference value performed by the calculation means, and alsoretaining a second table indicating a value-code correspondence which isapplied when the first gain control position information indicates aposition of a release portion and in which a code with a small number ofbits is assigned to a value having a high probability of being obtainedas the result of the calculation of the difference value performed bythe calculation means; the first encoding means performs encoding of thefirst gain control position information such that when the first gaincontrol position information corresponds to the position of an attackportion, a code corresponding to the difference value is retrieved fromthe first table and the retrieved code is employed as the code of thefirst gain control position information, while when the first gaincontrol position information corresponds to the position of a releaseportion, a code corresponding to the difference value is retrieved fromthe second table and the retrieved code is employed as the code of thefirst gain control position information.
 67. An encoding method for anencoding apparatus to encode a stereo audio signal such that aleft-channel signal and a right-channel signal of the stereo audiosignal are respectively split into band signals of left andright-channel signals in predetermined bands and gain adjustment is madeon the band signals, at a gain control position by a gain controlamount, for each of as many positions as indicated by a gain controlnumber, said encoding method comprising: a detection step of detectinggain control position information indicating a particular valuecorresponding to a gain control position of an arbitrary band signal ofa left-channel signal and that of a band signal of a right-channelsignal in the same band as that of the band signal of the left-channelsignal; a calculation step of calculating the difference value betweenfirst gain control position information detected in the detection stepfrom the band signal of the left-channel signal and second gain controlposition information detected in the detection step from the band signalof the right-channel signal; a retaining step of retaining a tableindicating a value-code correspondence in which a code with a smallnumber of bits is assigned to a value having a high probability of beingobtained as the result of the calculation of the difference valueperformed in the calculation step; a gain control position informationencoding step of encoding the first or second gain control positioninformation such that a code corresponding to the difference valuecalculated in the calculation step is retrieved from the table and theretrieved code is employed as the code of the first or second gaincontrol position information; a gain control number encoding step ofencoding the gain control number; and a gain control amount informationencoding step of encoding gain control amount information indicating aparticular value corresponding to the gain control amount.
 68. Anencoding apparatus for encoding a stereo audio signal such that aleft-channel signal and a right-channel signal of the stereo audiosignal are respectively split into band signals of left andright-channel signals in predetermined bands and gain adjustment is madeon the band signals, at a gain control position by a gain controlamount, for each of as many positions as indicated by a gain controlnumber, said encoding apparatus comprising: detection means fordetecting gain control position information indicating a particularvalue corresponding to a gain control position of an arbitrary bandsignal of a left-channel signal and that of a band signal of aright-channel signal in the same band as that of the band signal of theleft-channel signal; determination means for determining whether gaincontrol position information detected by the detection means from a bandsignal of the left-channel signal and second gain control positioninformation detected by the detection means from a band signal of theright-channel signal are equal to each other; gain control positioninformation encoding means for performing encoding such that if thedetermination made by the determination means is affirmative, a flagindicating that the first gain control position information and thesecond gain control position information are equal to each other and thefirst or second gain control position information are encoded, while, ifthe determination made by the determination means is negative, a flagindicating that the first gain control position information and thesecond gain control position information are not equal to each other,the first gain control position information, and the second and gaincontrol position information are encoded; gain control number encodingmeans for encoding the gain control number; and gain control amountinformation encoding means for encoding gain control amount informationindicating a particular value corresponding to the gain control amount.69. An encoding method for an encoding apparatus to encode a stereoaudio signal such that a left-channel signal and a right-channel signalof the stereo audio signal are respectively split into band signals ofleft and right-channel signals in predetermined bands and gainadjustment is made on the band signals, at a gain control position by again control amount, for each of as many positions as indicated by again control number, said encoding method comprising: a detection stepof detecting gain control position information indicating a particularvalue corresponding to a gain control position of an arbitrary bandsignal of a left-channel signal and that of a band signal of aright-channel signal in the same band as that of the band signal of theleft-channel signal; a determination step of determining whether gaincontrol position information detected in the detection step from theband signal of the left-channel signal and gain control positioninformation detected in the detection step from the band signal of theright-channel signal are equal to each other; a gain control numberencoding step of performing encoding such that if the determination madein the determination step is affirmative, a flag indicating that thefirst gain control position information and the second gain controlposition information are equal to each other and the first or secondgain control position information are encoded, while, if thedetermination made in the determination step is negative, a flagindicating that the first gain control position information and thesecond gain control position information are not equal to each other,the first gain control position information, and the second and gaincontrol position information are encoded; a gain control number encodingstep of encoding the gain control number; and a gain control amountinformation encoding step of encoding gain control amount informationindicating a particular value corresponding to the gain control amount.70. An encoding apparatus for encoding a stereo audio signal such that aleft-channel signal and a right-channel signal of the stereo audiosignal are respectively split into band signals of left andright-channel signals in predetermined bands and gain adjustment is madeon the band signals, at a gain control position by a gain controlamount, for each of as many positions as indicated by a gain controlnumber, said encoding apparatus comprising: detection means fordetecting gain control position information indicating a particularvalue corresponding to a gain control position of a band signal of aleft-channel signal and that of a band signal of a right-channel signal;determination means for determining whether gain control positioninformation detected by the detection means from the band signals of theleft-channel signal and gain control position information detected bythe detection means from the corresponding band signals of theright-channel signal are equal to each other for all bands; gain controlposition information encoding means for performing encoding such that ifthe determination made by the determination means is affirmative, thefirst or second gain control position information is encoded, while, ifthe determination made by the determination means is negative, the firstgain control position information and the second gain control positioninformation are encoded; gain control number encoding means for encodingthe gain control number; and gain control amount information encodingmeans for encoding gain control amount information indicating aparticular value corresponding to the gain control amount.
 71. Anencoding method for an encoding apparatus to encode a stereo audiosignal such that a left-channel signal and a right-channel signal of thestereo audio signal are respectively split into band signals of left andright-channel signals in predetermined bands and gain adjustment is madeon the band signals, at a gain control position by a gain controlamount, for each of as many positions as indicated by a gain controlnumber, said encoding method comprising: detection step for detectinggain control position information indicating a particular valuecorresponding to a gain control position of a band signal of aleft-channel signal and that of a band signal of a right-channel signal;a determination step of determining whether gain control positioninformation detected in the detection step from the band signal of theleft-channel signal and gain control position information detected inthe detection step from the band signal of the right-channel signal areequal to each other for all bands; a gain control number encoding stepof performing encoding such that if the determination made in thedetermination step is affirmative, the first or second gain controlposition information is encoded, while, if the determination made in thedetermination step is negative, the first gain control positioninformation and the second gain control position information areencoded; a gain control number encoding step of encoding the gaincontrol number; and a gain control amount information encoding step ofencoding gain control amount information indicating a particular valuecorresponding to the gain control amount.
 72. An encoding apparatus forencoding a stereo audio signal such that a left-channel signal and aright-channel signal of the stereo audio signal are respectively splitinto band signals of left and right-channel signals in predeterminedbands and gain adjustment is made on the band signals, at a gain controlposition by a gain control amount, for each of as many positions asindicated by a gain control number, said encoding apparatus comprising:detection means for detecting gain control position informationindicating a particular value corresponding to a gain control positionof an arbitrary band signal of a left-channel signal and that of a bandsignal of a right-channel signal in the same band as that of the bandsignal of the left-channel signal; first calculation means forcalculating the difference value between first gain control positioninformation and second gain control position information, wherein thefirst gain control position information is arbitrary gain controlposition information of one or more pieces of gain control positioninformation detected by the detection means from the band signal of theleft-channel signal, and the second gain control position informationhas a value corresponding to a gain control position adjacent to thefirst gain control position; second calculation means for calculatingthe difference value between third gain control position information andfourth gain control position information, wherein the third gain controlposition information and fourth gain control position information aregain control position information of one or more pieces of gain controlposition information detected from the band signal of the right-channelsignal, and the third gain control position information and fourth gaincontrol position information correspond to the first gain controlposition information and second gain control position information,respectively; third calculation means for calculating the differencevalue between the difference value calculated by the first calculationmeans and the difference value calculated by the second calculationmeans; retaining means for retaining a table indicating a value-codecorrespondence in which a code with a small number of bits is assignedto a value having a high probability of being obtained as the result ofthe calculation of the difference value performed by the thirdcalculation means; gain control position information encoding means forencoding the first gain control position information such that a codecorresponding to the difference value calculated by the thirdcalculation means is retrieved from the table and the retrieved code isemployed as the code of the first gain control position information;gain control number encoding means for encoding the gain control number;and gain control amount information encoding means for encoding gaincontrol amount information indicating a particular value correspondingto the gain control amount.
 73. An encoding apparatus according to claim72, wherein the table indicating the difference value versus codecorrespondence includes only one or more difference values having highprobabilities of being obtained as the result of the calculationperformed by the third calculation means; and in a case in which thecorrespondence of the calculated difference value is not indicated bythe table, the gain control position information encoding means encodesan escape code and the first gain control position information.
 74. Anencoding apparatus according to claim 72, wherein the retaining meansretaining a first table indicating a value-code correspondence which isapplied when the first gain control position information indicates aposition of an attack portion and in which a code with a small number ofbits is assigned to a value having a high probability of being obtainedas the result of the calculation of the difference value performed bythe third calculation means, and also retaining a second tableindicating a value-code correspondence which is applied when the firstgain control position information indicates a position of a releaseportion and in which a code with a small number of bits is assigned to avalue having a high probability of being obtained as the result of thecalculation of the difference value performed by the third calculationmeans; and the gain control position information encoding means encodesthe gain control position information such that when the first gaincontrol position information corresponds to the position of an attackportion, a code corresponding to the difference value is retrieved fromthe first table and the retrieved code is employed as the code of thefirst gain control position information, while when the first gaincontrol position information corresponds to the position of a releaseportion, a code corresponding to the difference value is retrieved fromthe second table and the retrieved code is employed as the code of thefirst gain control position information.
 75. An encoding method for anencoding apparatus to encode a stereo audio signal such that aleft-channel signal and a right-channel signal of the stereo audiosignal are respectively split into band signals of left andright-channel signals in predetermined bands and gain adjustment is madeon the band signals, at a gain control position by a gain controlamount, for each of as many positions as indicated by a gain controlnumber, said encoding method comprising: a detection step of detectinggain control position information indicating a particular valuecorresponding to a gain control position of an arbitrary band signal ofa left-channel signal and that of a band signal of a right-channelsignal in the same band as that of the band signal of the left-channelsignal; a first calculation step of calculating the difference valuebetween first gain control position information and second gain controlposition information, wherein the first gain control positioninformation is arbitrary gain control position information of one ormore pieces of gain control position information detected in thedetection step from the band signal of the left-channel signal, and thesecond gain control position information has a value corresponding to again control position adjacent to the first gain control position; asecond calculation step for calculating the difference value betweenthird gain control position information and fourth gaim control positioninformation, wherein the third gaim control position information andfourth gain control position information are gain control positioninformation of one or more pieces of gain control position informationdetected from the band signal of the right-channel signal, and the thirdgain control position information and fourth gain control positioninformation correspong to the first gain control position informationsecond gain control position information, respectively; a thirdcalculation step of calculating the difference value between thedifference value calculated in the first calculation step and thedifference value calculated in the second calculation step; a retainingstep of retaining a table indicating a value-code correspondence inwhich a code with a small number of bits is assigned to a value having ahigh probability of being obtained as the result of the calculation ofthe difference value performed in the third calculation step; a gaincontrol position information encoding step of encoding the first gaincontrol position information such that a code corresponding to thedifference value calculated in the third calculation step is retrievedfrom the table and the retrieved code is employed as the code of thefirst gain control position information; a gain control number encodingstep of encoding the gain control number; and a gain control amountinformation encoding step of encoding gain control amount informationindicating a particular value corresponding to the gain control amount.76. An encoding apparatus for encoding a stereo audio signal such that aleft-channel signal and a right-channel signal of the stereo audiosignal are respectively split into band signals of left andright-channel signals in predetermined bands and gain adjustment is madeon the band signals, at a gain control position by a gain controlamount, for each of as many positions as indicated by a gain controlnumber, said encoding apparatus comprising: detection means fordetecting gain control position information indicating valuescorresponding to gain control positions of an arbitrary first bandsignal, a second band signal, a third band signal, and a fourth bandsignal, respectively, the first band signal and the second band signalbeing of band signals of a left-channel signal, the second band signalbeing of a band adjacent to a band of the first band signal, the thirdband signal and the fourth band signal being of band signals of aright-channel signal, the third band signal corresponding to the firstband signal, the fourth band signal corresponding to the second bandsignal; first calculation means for calculating the difference valuebetween first gain control position information detected by thedetection means from the first band signal and second gain controlposition information detected by the detection means from the secondband signal; second calculation means for calculating the differencevalue between third gain control position information detected from thethird band signal and fourth gain control position information detectedfrom the fourth band signal; third calculation means for calculating thedifference value between the difference value calculated by the firstcalculation means and the difference value calculated by the secondcalculation means; retaining means for retaining a table indicating avalue-code correspondence in which a code with a small number of bits isassigned to a value having a high probability of being obtained as theresult of the calculation of the difference value performed by the thirdcalculation means; gain control position information encoding means forencoding the first gain control position information such that a codecorresponding to the difference value calculated by the thirdcalculation means is retrieved from the table and the retrieved code isemployed as the code of the first gain control position information;gain control number encoding means for encoding the gain control number;and gain control amount information encoding means for encoding gaincontrol amount information indicating a particular value correspondingto the gain control amount.
 77. An encoding apparatus according to claim76, wherein the table indicating the difference value versus codecorrespondence includes only one or more difference values having highprobabilities of being obtained as the result of the calculationperformed by the third calculation means; and in a case in which thecorrespondence of the calculated difference value is not indicated bythe table, the gain control position information encoding means encodesan escape code and the first gain control position information.
 78. Anencoding apparatus according to claim 76, wherein the retaining meansretaining a first table indicating a value-code correspondence which isapplied when the first gain control position information indicates aposition of an attack portion and in which a code with a small number ofbits is assigned to a value having a high probability of being obtainedas the result of the calculation of the difference value performed bythe third calculation means, and also retaining a second tableindicating a value-code correspondence which is applied when the firstgain control position information indicates a position of a releaseportion and in which a code with a small number of bits is assigned to avalue having a high probability of being obtained as the result of thecalculation of the difference value performed by the third calculationmeans; the first encoding means performs encoding of the first gaincontrol position information such that when the first gain controlposition information corresponds to the position of an attack portion, acode corresponding to the difference value is retrieved from the firsttable and the retrieved code is employed as the code of the first gaincontrol position information, while when the first gain control positioninformation corresponds to the position of a release portion, a codecorresponding to the difference value is retrieved from the second tableand the retrieved code is employed as the code of the first gain controlposition information.
 79. An encoding method for an encoding apparatusto encode a stereo audio signal such that a left-channel signal and aright-channel signal of the stereo audio signal are respectively splitinto band signals of left and right-channel signals in predeterminedbands and gain adjustment is made on the band signals, at a gain controlposition by a gain control amount, for each of as many positions asindicated by a gain control number, said encoding method comprising: adetection step for detecting gain control position informationindicating values corresponding to gain control positions of anarbitrary first band signal, a second band signal, a third band signal,and a fourth band signal, respectively, the first band signal and thesecond band signal being of band signals of a left-channel signal, thesecond band signal being of a band adjacent to a band of the first bandsignal, the third band signal and the fourth band signal being of bandsignals of a right-channel signal, the third band signal correspondingto the first band signal, the fourth band signal corresponding to thesecond band signal; a calculation step of calculating the differencevalue between first gain control position information detected in thedetection step from the first band signal and second gain controlposition information detected in the detection step from the second bandsignal; a second calculation step for calculating the difference valuebetween third gain control position information detected from the thirdband signal and fourth gain control position information detected fromthe fourth band signal; a third calculation step of calculating thedifference value between the difference value calculated in the firstcalculation step and the difference value calculated in the secondcalculation step; a retaining step of retaining a table indicating avalue-code correspondence in which a code with a small number of bits isassigned to a value having a high probability of being obtained as theresult of the calculation of the difference value performed in the thirdcalculation step; a gain control position information encoding step ofencoding the first gain control position information such that a codecorresponding to the difference value calculated in the thirdcalculation step is retrieved from the table and the retrieved code isemployed as the code of the first gain control position information; again control number encoding step of encoding the gain control number;and a gain control amount information encoding step of encoding gaincontrol amount information indicating a particular value correspondingto the gain control amount.
 80. An encoding apparatus for encoding anacoustic time series signal such that the acoustic time series signal issplit into band signals in predetermined bands and gain adjustment ismade on the band signals in accordance with gain control amount data atas many positions indicated by gain control position data as indicatedby gain control number data, said encoding apparatus comprising: bandsplitting means for splitting the acoustic time series signal into Nbands thereby producing N band signals; execution means for producingthe gain control numbers, the gain control amount information havingvalues corresponding to the gain control amounts, and gain controlposition information having values corresponding to the gain controlpositions associated with the respective band signals and executing gaincontrol process on the band signals in accordance with the gain controlnumbers, the gain control amount information, and the gain controlposition information; a plurality of gain control number encoding meansfor encoding the gain control number; first selection means forselecting one of the gain control number encoding means, in accordancewith information indicating the code length of the gain control numbersencoded by the plurality of gain control number encoding means; aplurality of gain control amount information encoding means for encodingthe gain control amount information; second selection means forselecting one of the gain control amount information encoding means, inaccordance with information indicating the code length of the gaincontrol amount information encoded by the plurality of gain controlamount information encoding means; a plurality of gain control positioninformation encoding means for encoding the gain control positioninformation; third selection means for selecting one of the gain controlposition information encoding means, in accordance with informationindicating the code length of the gain control position informationencoded by the plurality of gain control position information encodingmeans; and multiplexing means for multiplexing the gain control numbersencoded by the gain control number encoding means selected by the firstselection means, the gain control amount information encoded by the gaincontrol amount information encoding means selected by the secondselection means, and the gain control position information encoded bythe gain control position information encoding means selected 1by thethird selection means, together with the encoded acoustic time seriessignal, thereby producing encoded data.
 81. An encoding method for anencoding apparatus to encode an acoustic time series signal such thatthe acoustic time series signal is split into band signals inpredetermined bands and gain adjustment is made on the band signals, ata gain control position by a gain control amount, for each of as manypositions as indicated by a gain control number, said encoding methodcomprising: a band splitting step of splitting the acoustic time seriessignal into N bands thereby producing N band signals; an execution stepof producing the gain control numbers, the gain control amountinformation having values corresponding to the gain control amounts, andgain control position information having values corresponding to thegain control positions associated with the respective band signals andexecuting gain control process on the band signals in accordance withthe gain control numbers, the gain control amount information, and thegain control position information; a gain control number encoding stepof encoding the gain control numbers; a first selection step ofselecting one of the gain control number encoding step, in accordancewith information indicating the code length of the gain control numbersencoded in the plurality of gain control number encoding step; aplurality of gain control amount information encoding steps for encodingthe gain control amount information; a second selection step ofselecting one of the gain control amount information encoding step, inaccordance with information indicating the code length of the gaincontrol amount information encoded in the plurality of gain controlamount information encoding step; a plurality of gain control positioninformation encoding steps for encoding the gain control positioninformation; a third selection step of selecting one of the gain controlposition information encoding step, in accordance with informationindicating the code length of the gain control position informationencoded in the plurality of gain control position information encodingstep; and a multiplexing step of multiplexing the gain control numbersencoded in the gain control number encoding step selected in the firstselection step, the gain control amount information encoded in the gaincontrol amount information encoding steps selected in the secondselection step, and the gain control position information encoded in thegain control position information encoding steps selected in the thirdselection step, together with the encoded acoustic time series signal,thereby producing encoded data.